Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharepoint: Replacing Files of Specific Types Return 404 #1068

Closed
1 of 3 tasks
Cnly opened this issue May 21, 2019 · 13 comments
Closed
1 of 3 tasks

Sharepoint: Replacing Files of Specific Types Return 404 #1068

Cnly opened this issue May 21, 2019 · 13 comments
Labels
automation:Closed Needs: Attention 👋 Needs attention, after providing additional information status:investigating

Comments

@Cnly
Copy link

Cnly commented May 21, 2019

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.

@ghost
Copy link

ghost commented May 21, 2019

Thank you for your contribution to OneDrive API Docs. We will be triaging your incoming issue as soon as possible.

@abraunegg
Copy link

@Cnly
Most likely - as you are uploading to Sharepoint - are being hit by this bug - #935

Microsoft modifies your files when uploading to Sharepoint by 'enriching' them, thus the file you 'think' your trying to replace actually now does not exist - the MS version does, with it's metadata / content.

@chackman
Copy link
Contributor

Thanks for your feedback. Could you please clarify when the application uploaded the original version of the document? And whether there were other upload sessions that had recently been created on this file, such as to replace the content?

@Cnly
Copy link
Author

Cnly commented May 30, 2019

@chackman Thanks for replying. The application uploaded the first version of the document no more than 3 minutes before uploading the modified version. (If you need a timestamp I can re-run the steps to reproduce.) There shouldn't be other upload sessions as the document is a newly created one. And I'm not using other clients such as the official OneDrive client.

@chackman
Copy link
Contributor

Thanks @Cnly, we have sent the request/response information along to another team for them to investigate further.

@chackman chackman added Needs: Attention 👋 Needs attention, after providing additional information and removed Needs: Triage 🔍 Needs initial triage assessment labels Jun 10, 2019
@kotsak
Copy link

kotsak commented Jun 13, 2019

Not sure how related could be to an issue I had raised almost 2 years ago and it still bugs some of our users from time to time. In our case the only solution is to manually deleted the existing files before re-uploading.
#689

@chackman
Copy link
Contributor

I have requested an update from the team looking in to this issue.

@alexgran
Copy link

Hey, @chackman any news one the issue? We are seeing this also while trying to sync a few TB into onedrive/sharepoint. Together with the known defect of sharepoint modifying uploaded files, finding out if an upload was successful is not straight forward...

@chackman
Copy link
Contributor

chackman commented Aug 14, 2019

I have requested an update from the team looking in to this issue. (Again.)

@ItherNiT
Copy link

Hey, @chackman any update from the team yet?

@chackman
Copy link
Contributor

Sorry, nothing to report from that team.

@akdor1154
Copy link

2.5 years later.. any movement? :)

@patrick-rodgers
Copy link
Contributor

As part of a repository clean up effort we are closing older issues. If this issue remains, please: open a new issue, reference this issue, and provide any additional details that may help in resolution. Thank you for your understanding as we work to improve our responsiveness.

@OneDrive OneDrive locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automation:Closed Needs: Attention 👋 Needs attention, after providing additional information status:investigating
Projects
None yet
Development

No branches or pull requests

8 participants