Forums / Developer / upload image in attribute

upload image in attribute

Author Message

Joël LEGER

Thursday 24 September 2009 1:57:05 am

Hi,

i'm fighting for inserting an uploaded image as an attribute :

$result = array( 'errors' => array() );
$upload = new eZContentUpload();
if($upload->handleUpload( $result, 'image', object.main_node_id, object.main_node_id )){
		
   $datamap['image']->fromString($result['result']['path']);
  $datamap['image']->store();
}

 

it create an object image under my object , actually i would like the same feature as a class with datatype image.