You need to sign in to do that
Don't have an account?
Posting PDF file in Document object using REST API
Hi,
i am trying to post/create a new pdf Document record in salesforce Document object from one org to other using REST API.
i am querying the BLOB data from one Document record from soure org and preparing a POST request and trying to post it in other org .
i am using EncodingUtil.base64Encode(Sourcedocument.body) to send the pdf file.
but this file is not getting saved correctly and unabel to open the PDF (getting error : File not start with %PDF). its getting corrupted
what is the mistake i am doing please let me know. is the way i am sending the binary data is wrong ?
please let me know if anyone have idea about this
Thank you
Regards,
Rakesh
I think attachment/document body is already base64. Could you do something like this?
Saraag