url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Document')/Files/add(url='abc.docx',overwrite=true),
method: POST,
body: "This is my doc",
Headers:
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.