Skip to content

createUploadSession requires full path - #8057

Open
projekter wants to merge 1 commit into
apache:mainfrom
projekter:patch-2
Open

createUploadSession requires full path#8057
projekter wants to merge 1 commit into
apache:mainfrom
projekter:patch-2

Conversation

@projekter

Copy link
Copy Markdown

Closes #8056

@projekter
projekter requested a review from Xuanwo as a code owner August 12, 2026 14:27
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Aug 12, 2026

@erickguan erickguan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need a behavior test run!

let url = format!(
"{}:/createUploadSession",
self.onedrive_item_url(parent_path, true),
self.onedrive_item_url(parent_path, true) + "/" + file_name,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you document why do we need this since Microsoft doc doesn't explicitly require a file name.

Also, I would suggest building the path firstly to onedrive_item_url.

@Xuanwo

Xuanwo commented Aug 13, 2026

Copy link
Copy Markdown
Member

We also need a behavior test run!

We don't have an onedrive account for testing so far. And there isn't a stable way to get the oauth workflow works offline.

@erickguan

Copy link
Copy Markdown
Member

Microsoft Graph Explorer might still be available:

  1. Generate a token from a personal test account in API Graph explorer:
  • Files.ReadWrite.
  • DelegatedPermissionGrant.ReadWrite.All
  • Directory.Read.All
  1. Export OPENDAL_ONEDRIVE__TOKEN.

OPENDAL_TEST=onedrive cargo test behavior --features tests,services-onedrive -- --show-output

It's inconvenient but should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: OneDrive upload session fails

3 participants