As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
properties.put(ContentModel.PROP_CONTENT, new ContentData(null, MimetypeMap.MIMETYPE_IMAGE_JPEG, 0L, null));
MimetypeMap.MIMETYPE_IMAGE_TIFF
File outputfile = File.createTempFile("file", "aux"); outputfile.createNewFile(); ImageIO.write(Image_Content, "tiff", outputfile); ContentWriter writer2 = getContentService().getWriter(this.newNodeRecorte.getNodeRef(), ContentModel.PROP_CONTENT, true); // set the mimetype and encoding writer2.setMimetype("image/tiff"); writer2.setEncoding("UTF-8"); writer2.putContent(outputfile); // Destruimolo ficheiro final outputfile.delete();