AnsweredAssumed Answered

insert/retrieve image using rest api

Question asked by Amulya Velpula on Jul 18, 2015
Latest reply on Jul 21, 2015 by Amulya Velpula
How to insert and retrieve images from a record in sugarcrm. I use the following procedure, but no images gets uploaded. I set no_image in the detail view. 

$contents = file_get_contents('1436568236500.jpg');
$set_entry_list_parameters = array(
         'session' => $login_result->id,
         'module_name' => 'WBUR_Vehicle',
         'name_value_list' => array(
                 array('name'=>'id','value'=>'376e1f17-d797-b629-92cc-558f28228524'),
                 array('name'=> 'front_left_image_c', 'value'=> base64_encode($contents)),
                 ),
         );
         $get_entry_list_result = call('set_entry', $set_entry_list_parameters, $url);

Also, how do I retrieve the images?

Outcomes