Cnly · GitHub

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

  1. Create an Office document file (.docx) locally. This file should not exist on remote at this time.
  2. Upload it to a Sharepoint site with requests POST /v1.0/drives/b!{driveID}/items/{itemID}:/{filename}.docx:/createUploadSession and PUT {path in uploadUrl}. The upload should succeed normally.
  3. Make any changes to the local document file.
  4. Re-upload the modified file using the same types of requests in step 2.
  5. The server returns 200 for createUploadSession, but then 404 for PUT, with the body {"error":{"code":"itemNotFound","message":"The resource could not be found."}}.

Thank you.

Read the original on github.com ↗