Uploading image field for the content type from plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Uploading image field for the content type from plugin

hpaks23@gmail.com
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!

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/b08aafba-1492-4a5e-a1cd-041221e2b05c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.