Category
- Question
- Documentation issue
- Bug
Expected or Desired Behavior
After uploading a file with the API to Sharepoint, re-uploading a modified version of the file should work and should replace the previously uploaded version.
Observed Behavior
For files of some types (currently there have been reports for .docx and .xlsx), attempts to replace the uploaded versions get 404 instead: {"error":{"code":"itemNotFound","message":"The resource could not be found."}}
Response headers required:
Date: Tue, 21 May 2019 18:34:35 GMT
Request-Id: 95ddde9e-2046-0000-348a-810bf34ec6af
Sprequestguid: 95ddde9e-2046-0000-348a-810bf34ec6af
Steps to Reproduce
- Create an Office document file (
.docx) locally. This file should not exist on remote at this time. - Upload it to a Sharepoint site with requests
POST /v1.0/drives/b!{driveID}/items/{itemID}:/{filename}.docx:/createUploadSessionandPUT {path in uploadUrl}. The upload should succeed normally. - Make any changes to the local document file.
- Re-upload the modified file using the same types of requests in step 2.
- The server returns
200forcreateUploadSession, but then404forPUT, with the body{"error":{"code":"itemNotFound","message":"The resource could not be found."}}.
Thank you.