Example of add file or image node via API

Author Message

Christophe Saint-Pierre

Thursday 13 November 2008 7:46:09 am

Hi ,
I search for examples of codes for create nodes of File class or Image class
passing the filename in parameter.
Does anyone has some working example on version 4.0.1.

Thanks.

Piotrek Karaƛ

Tuesday 18 November 2008 8:34:19 pm

I don't have a solution, but can give you a hint:

1) Find a tutorial on how to create objects with eZ API in general. That's a must.
2) Learn a bit about how datatypes are created.
3) Each content object attribute of different datatype may have its own way of storing data, and File datatype will most likely do. List your file class attributes, and for each one, go to /kernel/classes/datatyles/* and learn how it fetches/stores data, and use that API.
4) Don't forget to publish the newly created object/node.

Hope this helps (a little bit) ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.