Share » Forums » General » eZContentUpload question

eZContentUpload question

eZContentUpload question

Tuesday 26 June 2007 1:27:31 pm - 4 replies

Author Message

Łukasz Serwatka

Tuesday 26 June 2007 11:40:54 pm

Hi,

You can use insertHTTPFile() method which is available for ezimage, ezbinaryfile, ezmedia datatypes.

More info:
http://ez.no/download/ez_publish/changelogs/ez_publish_3_5/general_insertion_interface_for_datatypes
http://ez.no/community/forum/developer/howto_use_ezcontentobjectattribute_setcontent_on_a_simple_text_datatype
http://pubsvn.ez.no/doxygen/trunk/html/classeZBinaryFileType.html#f8ff4fd587757aad674eef1cf0d4bfaf
http://pubsvn.ez.no/doxygen/trunk/html/ezbinaryfiletype_8php-source.html#l00368

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Carlos Revillo

Wednesday 27 June 2007 1:24:03 am

Hi and thanks Lukas. but i'm missing something.

I have used insertHTTPFile to add some binary content as the content of an attribute. But this is not the case.

I have no file attribs an my class. I want to add this uploaded file as a related object of a main node.

I try to explain it better. Let's suppose my test class has only one field. Let's called it name.

in my template i have an form with a text field for name and some input files fields to add files as related content, not as attributes of the object i'm creating.

Do you think insertHTTPFile could still be valid for my purpose?

Łukasz Serwatka

Wednesday 27 June 2007 1:33:31 am

Hi,

I suggest to use contetobjects anyway. Then you still need to create one more content object, e.g binary file where you will need to store file from user in attribute, then add relation using PHP to your primary object where is only "Name". You can also make structure where object with file is a child of primary object, then just fetch it in tpl.
Hope that will help you.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Carlos Revillo

Wednesday 27 June 2007 1:40:00 am

I see. Thanks a lot!.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu