Menu
Welcome, Guest
Username: Password: Remember me

TOPIC: API not working for Image type field

API not working for Image type field 3 months 3 weeks ago #79526

  • Ashish.Negi
  • Ashish.Negi's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Thank you received: 1
  • Karma: 0
Hi,
I have a candidate module, whether I am trying to send Candidate's photo from API.
Photo field I have created is image type.

I am using this code
$photo_data = base64_encode( $encoded_data ); 

if(isset($results)){ 
$set_entry_parameter5 = array(
      "session" => $_SESSION['session_id'],
         "module_name" => "adi_1_Candidate_recruiters",
         "name_value_list" => array(
          array("name" => "id", "value" => $_SESSION['record_id']),
            array("name" => "image_c_record_id", "value" => $_SESSION['record_id']),
			array("name" => "image_c", "value" => "Candidate photo"),
            array("name" => "image_c_file", "value" => $photo_data),        
            ), 
    );

print_r($set_entry_parameter5);
   $crmurl = 'http://localhost/crm_registration/crm_registration1/service/v4/rest.php';
 $set_entry_result5 = call_curl("set_entry", $set_entry_parameter5, $crmurl,1);

I am able to save photo successfully at local but it is not coming in API.

Please help!
About Company www.outrightsystems.org/blog
3 Years Experience SugarCRM / SuiteCRM Developer
Developer@ www.outrightsystems.org
Claim your Free Plugins before they go paid!!
store.outrightcrm.com/product-tag/free/
Skype : live:ashish.negi_9
The administrator has disabled public write access.
Time to create page: 0.033 seconds
Powered by Kunena Forum