Hello,
I’m trying to load a image to field “photo” from database “Personal Address Book” with a Java program.
I see this field is a Rich Text Lite configurated to show thumbnails.
I don’t get save a image and show it.
First,I load a file image and convert it to thumbnail. After I use the command:
RichTextItem img =null;
img = (RichTextItem) doc.getFirstItem(“Photo”);
if (doc.hasItem(“Photo”))
_log.info("Has photo");
else
img6 = doc.createRichTextItem("Photo");
img.embedObjec(EmbeddedObject.EMBED_ATTACHMENT, null, path2, “ContactPhoto”);
But I don’t see the photo but is created a internal field called “$File” with a file name generated randomly.
I verify that I load manually a photo in this field. It creates a internal field called “$file” with a name file “contactphoto”.
I think if this command saved the file with name “ContactPhoto” I would work.
Please, could someone help me? I 'm desperate…
thank you