Tuesday 26 June 2007 1:27:31 pm
Hi. I'm working in a extension. I want some users can add articles to the site, and some related object (pdf files, zip files... ). to them. So i'm trying to do it using ezContentUpload class, but i have no luck. what i'm doing is something like this
$upload = new eZContentUpload( );
$upload->handleUpload($result,"file1","auto","false");
where "file1" is the name of one of the file inputs coming from post. These users has also rights to create new content at media section. But i don't see any changes in the tree content of that section. So i have some questions. Do i have to publish this object maybe using something like
$upload->publishObject(...);
? If yes, how do i have to call this function? i'm trying with
$upload = new eZContentUpload( );
$upload->handleUpload($result,"file1","auto","false");
$upload->publishObject($result);
but i get
Fatal error: Call to a member function on a non-object in .../kernel/classes/ezcontentupload.php on line 698
Fatal error: eZ publish did not finish its request
The execution of eZ publish was abruptly ended, the debug output is present below.
Looking to that line of that class it seems like the function needs and $object to work, but i don't know what "object" do i have to pass to the function... anyone can help me with this? thanks.
|