url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Document')/Files/add(url='abc.docx',overwrite=true),
method: POST,
body: "This is my doc",
  Authorization: "Bearer " + accessToken
  X-RequestDigest: form digest value
  content-length:length of post body

According to the above configuration, I created the docx file in SharePoint site using rest API endpoint but it couldn't view or edit. It gives corruption error. Please give the solution for this.

1 Answer 1


Can you already see the file uploaded to the real Sharepoint site?

(this is not an answer, for now I can't post a comment)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.