Files are not clear when uploaded through Sharepoint REST API

Madhu Sudan Singh 61 Reputation points
2021-07-14T07:03:43.37+00:00

Hi,

When I am uploading files to Sharepoint using REST API, files are getting stored in Sharepoint, but those files are incomplete. For Image files, either color are not clear or only half of the image is uploaded. For pdf files, some portion of the page itself is not displaying.

I am not sending any header other than 'Authorization' and in body, I am sending Blob content.

I am doing Salesforce integration with Sharepoint through Salesforce's APEX coding and not JQuery/Javascript

Regards
Madhusudan Singh

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-07-15T06:52:49.143+00:00

    Hi @Madhu Sudan Singh ,
    Please try upload files by postman like following picture:
    114934-image.png
    I have tested to upload pdf and image files, and it works.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.