You need to sign in to do that
Don't have an account?

Does apex support rest api for multipart/form-data requests made from external system
If there is a possiblity, then
Can I get a code sample (having @http post method) on how to upload pdf file into salesforce object (say as an attachment) sent to salesforce with a http request using multipart/from-data from some external site.
For a while I've gone through multipart/form-data in the developer forum, but I could only find the HTTP Request samples made from salesforce and not to salesforce.
Thanks,
Leafen.
Can I get a code sample (having @http post method) on how to upload pdf file into salesforce object (say as an attachment) sent to salesforce with a http request using multipart/from-data from some external site.
For a while I've gone through multipart/form-data in the developer forum, but I could only find the HTTP Request samples made from salesforce and not to salesforce.
Thanks,
Leafen.
Refer this link
https://salesforce.stackexchange.com/questions/132135/how-can-i-compose-a-multipart-form-data-request
https://developer.salesforce.com/forums/?id=9060G000000BiXuQAK
Thanks for your reply.
I've gone through both of these links(even already) and I guess there they are just making a http request from salesforce to a external location.
But I actually want to write a RESTful Web service Apex class (@RestResource(urlMapping='/url/')) to receive the request sent from an external system.
I've written it many times before but not sure what kind of change should I do to handle a request having multipart/form-data as a content type in its header.
https://salesforce.stackexchange.com/questions/176856/help-with-rest-api-on-multipart-content-type
Even in the above link, one of the answer is like its not supported.
So just want to know, is it still not supported or is there an update on that.
Thanks.
Follow This blog.
Here is a solution using which we can create a custom Apex REST service to accept multipart/form-data requests
https://inteygrate.com/apex-rest-does-not-support-multipart-form-data-requests/