Uploading image field for the content type from plugin

12 views
Skip to first unread message

hpa...@gmail.com

unread,
Aug 7, 2017, 8:44:09 PM8/7/17
to dotCMS User Group
Hello,

I am trying to add new content with image field from plugin code. I am not sure what is the exact way to do it. I have tried following way, 

currentElem = nodeElem.element("Image_Thumb");

elemValue = currentElem.getText();

File thumbnailFile = new File(elemValue);

content.setBinary("picture"thumbnailFile);



field is created as follows :


field = new Field("Picture", Field.FieldType.BINARY, Field.DataType.BINARYBWFStructurefalsefalsetrue,

7, """"""falsefalsetrue);

FieldFactory.saveField(field);


But has not helped. Any help with this is appreciated.


Thank you!

Reply all
Reply to author
Forward
0 new messages