Linked Questions

0 votes
0 answers
640 views

How to send multiple files in multipart/form-data using REST API [duplicate]

I need to send 2 files to an external system in multipart/form-data using REST API. I'm able to do it using postman. I have 2 attachments stored in Attachments object. I need to send both files (as ...
Manoj's user avatar
  • 444
0 votes
0 answers
158 views

How to create a HTTP Request with multiple values in form-data as body [duplicate]

I have a use case that necessitates the inclusion of form data, including a file, within the body of an HTTP request. How can I accomplish this using Apex? I aim to replicate a similar request to the ...
Mridul Kapil's user avatar
0 votes
1 answer
111 views

blob is not a valid utf-8 string error [duplicate]

String body = '' + documentList[0].VersionData+ ''; system.debug('body---'+body); HttpRequest req = new HttpRequest(); req.setBody(body); req.setHeader('Content-Type','multipart/form-data; boundary='+...
user106835's user avatar
0 votes
1 answer
139 views

How to send an image to third party when the content type is multipart/form-data ? How to add two parameters while sending a request? [duplicate]

I have to send an images to third party system and content type provided is multipart/formdata and I have to add two parameters in it. and then want to send the request. How to send 2 parameters in it ...
Anita D's user avatar
1 vote
0 answers
60 views

Constructing a multipart/form-data request for transmitting a PDF to an external service [duplicate]

I'm trying to make a POST request to this specific endpoint from Apex to include what is required; a task Id and a single file. It has been very difficult. At first, Bad Request responses was all I ...
Doodool_Tala's user avatar
0 votes
0 answers
38 views

Send multiple Content Document in a rest api in salesforce [duplicate]

I am sending related attachments from an email message to an external api but the files arrive damaged. I have tried with other files from other sources but it doesn't work in salesforce. Here is the ...
Felipe Peña's user avatar
0 votes
0 answers
19 views

how to create multipart/form-data callout from apex along with few more fields to send [duplicate]

We are doing freskdesk integration and want to do this callout - add Note to ticket This integration require multipart-form data request type. Checked many blogs and stackover flow question-answer but ...
Ankuli's user avatar
  • 670
0 votes
0 answers
18 views

How to sent ContentVersion's VersionData through API? [duplicate]

I am trying to send a pdf file attached to a record of custom object to an external system. I am using ContentDocumentLink and ContentVersion to get the file in apex and make a api call. File is ...
PARAG TALUKA's user avatar
4 votes
4 answers
22k views

Send Blob file via Apex Rest Callout

I'm trying to send a Blob Apex REST callout and it is keep failing. I tried all the examples in the web but didn't work. What is the standard and correct way to send Blob data via REST callouts? //...
MalindaL's user avatar
2 votes
3 answers
4k views

How to upload an image as a binary file via the Linkedin API v2 with a 'POST' request

I want to know how to make a proper 'POST' request to upload an image as a binary file to Linkedin via their API. This is what they say in their documentation (https://docs.microsoft.com/en-us/...
Zufra's user avatar
  • 121
1 vote
1 answer
2k views

Compose a multipart/form-data request from apex without base64 encode

May you have already tryed this solution, that use base64 May base64 encoded request work for you, but sometimes add some blank spaces in your params or params values is not a option, that is my case. ...
nivolax's user avatar
  • 59
0 votes
1 answer
2k views

Error received: {"document":["The submitted data was not a file. Check the encoding type on the form."],"status_code":400}

I'm trying to do a POST call to SBA from Salesforce that involves uploading a file. The call asks for 4 parameters in the form of JSON. As I have tested, 3 of the 4 JSON fields are passing ...
Strineninja27's user avatar
0 votes
1 answer
796 views

Attachment downloaded as type file

I have below code to add content document versionData into standard attachment. Map<Id, Blob> bodyContent = new Map<Id, Blob>(); List<ContentVersion> contentDocs = [SELECT ...
JURY's user avatar
  • 183
0 votes
1 answer
429 views

Adding Files to FormData isnt working with solutions provided

I was having trouble adding Files to a formdata and my question (How to add a file to a formdata for an api in apex) was closed because there were other solutions that should work. I've tried Compose ...
kimberly modeste's user avatar
0 votes
1 answer
294 views

/metadata/deployRequest API deployment status: No package.xml found

I'm trying to deploy an Apex Class using Postman and the /metadata/deployRequest API. I get a 201 response, but when I check the deployment status, I see the error "No package.xml found". ...
Brandon DeMatteis's user avatar

15 30 50 per page