function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sachin_KSachin_K 

sending image to external service - api call

Hi,

 

I need to send an image to an external service through apex api call.

 

1)does salesforce support multipart/form-data in api call ??

 

2) also i need to send parameter (name of image) to that external service .so can i send blob as value string parameters in a single request ??

 

Thanks for your suggestions

 

almazanjlalmazanjl

Hi.

 

Try this solution. Valid for servers that only support binary content and for servers that support base64 encoding.

 

http://salesforceafondo.wordpress.com/2013/01/08/post-multipartform-data-out-of-salesforce-com-with-apex/

 

Hope this helps.

 

José Luis Almazán.