Some functions on this portal require JavaScript but your browser does not support it or it has been disabled.
Skip to main content
Wednesday 21 May 2008 2:39:59 am - 5 replies
Modified on Wednesday 21 May 2008 2:42:39 am by Jacques Feix
André R.
Wednesday 21 May 2008 3:57:25 am
Is the file bigger then what you allow in php settings?
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Jacques Feix
Wednesday 21 May 2008 4:59:31 am
Hi André, I thought about it, but my file is only 154 koAlso, I can upload it when I create a new "file" object
Wednesday 21 May 2008 5:36:12 am
Beats me, try this upload code from Oe ('fileName' is name on file input):
include_once( 'kernel/classes/ezcontentupload.php' ); $upload = new eZContentUpload(); $location = false; if ( $http->hasPostVariable( 'location' ) ) { $location = $http->postVariable( 'location' ); if ( $location === 'auto' || trim( $location ) === '' ) $location = false; } $objectName = ''; if ( $http->hasPostVariable( 'objectName' ) ) { $objectName = trim( $http->postVariable( 'objectName' ) ); } $uploadedOk = $upload->handleUpload( $result, 'fileName', $location, false, $objectName ); if ( $uploadedOk ) { $newObject = $result['contentobject']; $newObjectID = $newObject->attribute( 'id' ); //and so on } else { foreach( $result['errors'] as $err ) echo $err['description'] . '<br />'; }
Wednesday 21 May 2008 6:23:07 am
André,I can't use your code. each time the "handleUpload" function return an error :
the problem is here :
$locationOK = $this->detectLocations( $classIdentifier, $class, $location, $parentNodes, $parentMainNode );
I tried 'auto', and a correct nodeID for $location but it doesn't workAlso, I am not really interested by creating an eZPublish object with my file, I just want to upload it ...
thx,
Wednesday 21 May 2008 8:15:54 am
oupsssssMy firefox has a problem, when I do it with IE it is ok ...
Sorry for this post .. :)
You must be logged in to post messages in this topic!