Share » Forums » Developer » What's wrong with this code?

What's wrong with this code?

What's wrong with this code?

Monday 03 October 2005 4:35:21 am - 1 reply

Author Message

*- pike

Thursday 02 November 2006 5:01:15 pm

Hoi Clemens

I was looking for something else when I bumped into kernel/classes/ezcontentupload.php

function handleUpload( &$result, $httpFileIdentifier, $location, $existingNode )

not exactly what you're looking for either; because it uses upload.ini to determine what object class to use for a mimetype, and then chooses its attribute itself. but it could help / aka the code you need might be in there ?

for example, I see
$status = $dataMap[$fileAttribute]->insertHTTPFile( $object, $publishVersion, eZContentObject::defaultLanguage(), $file, $mimeData, $storeResult );

oh, .. ok, .. insertHTTPFile looks like 99% your code :-) except for

  $db =& eZDB::instance();
  $db->begin();
   ....code
  $db->commit();

eh; dont know.

good luck!
*pike

---------------
The class eZContentObjectTreeNode does.

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

36 542 Users on board!

Forums menu