You need to sign in to do that
Don't have an account?
Laxman Vattam 26
Sending File body from Salesforce to Sharepoint using REST API
Requirement: We have a requirement to download a particular version of file (contentVersion: using the versiondata field on contentversion) and upload this docuement to sharepoint. Documents can be of any type. For e.g. PDF, Doc, CSV, Png, txt etc. -
Problem Statement: We are able to read the content version data from contentversion object. But Salesforce encodes the document into the binary file while storing it into Salesforce. While uploading the document(via REST integration) into SharePoint, we are not able to decode the binary file into the actual file stored and hence the uploaded document is not opening in SharePoint site with following error “Failed to load the document.
Many solutions in forums suggest to use EncodingUtil.base64Decode(inputString) or convertToHex(inputBlob) but these conversions are failing with error message (Not a valid UTF 8 character or Illegal hexadecimal character � at index )
Can someone shred some light on how to convert this before sending to sharepoint so that is is in readable format?
Problem Statement: We are able to read the content version data from contentversion object. But Salesforce encodes the document into the binary file while storing it into Salesforce. While uploading the document(via REST integration) into SharePoint, we are not able to decode the binary file into the actual file stored and hence the uploaded document is not opening in SharePoint site with following error “Failed to load the document.
Many solutions in forums suggest to use EncodingUtil.base64Decode(inputString) or convertToHex(inputBlob) but these conversions are failing with error message (Not a valid UTF 8 character or Illegal hexadecimal character � at index )
Can someone shred some light on how to convert this before sending to sharepoint so that is is in readable format?
Have you solve the issue?
I am having same requirenment but not able to finish my task. Any lead will be great help for me.
Thanks.