Skip to content

bug: onedrive big file write failure #7256

@emliunix

Description

@emliunix

Describe the bug

Big file upload to onedrive fails.

Steps to Reproduce

Upload a big file to trigger create upload session

2026-03-20T14:15:15.560999Z ERROR request{method=PUT uri=/zotero/CHTED7JW.zip version=HTTP/1.1}: opendal::services: service=onedrive name= path=CHTED7JW.zip written=22401199: write close failed Unexpected (permanent) at write => {"error":{"code":"invalidRequest","message":"Name from path does not match name from body","innerError":{"date":"2026-03-20T14:15:15", ... }}}

Context:
   uri: https://graph.microsoft.com/v1.0/me/drive/root:/zotero_attachments:/createUploadSession
   response: Parts { status: 400, version: HTTP/1.1, headers: {"cache-control": "no-store, no-cache, max-age=0, private", "transfer-encoding": "chunked", "content-type": "application/json", ..., "date": "Fri, 20 Mar 2026 14:15:15 GMT"} }
   service: onedrive
   path: CHTED7JW.zip
   written: 22401199

Expected Behavior

no error

Additional Context

Per doc: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_createuploadsession?view=odsp-graph-online#upload-bytes-to-the-upload-session

I think it's expecting a path in the full path in url including filename not just the base dir.

I came across this issue recently, so it might works before, but now it fails.

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleases-note/fixThe PR fixes a bug or has a title that begins with "fix"

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions