Url length calc error when upload file by creating an upload session

静维 李 0 Reputation points
2023-07-13T23:56:03.5033333+00:00

Describe the bug
When uploading a file with an upload session, the session will create a temp file named ~tmp{two digits hash}_{originFileName}.{ext} .
And the path of length will contain the part of temp file name, so i can only upload a file with length or path max to 393.

Screenshots
[企业微信截图_16891510726928

](https://user-images.githubusercontent.com/28803983/252909147-e5549b92-be3b-4bcf-88fe-50fed1a03e98.png)

The error is returned from the API.
[image

](https://user-images.githubusercontent.com/28803983/253143025-014d8022-fd0f-431f-851f-537b3f34f703.png)

If I upload the same file without creating a session to the same location, will success.
[image

](https://user-images.githubusercontent.com/28803983/253146217-81bc3224-09ec-4bb2-987b-8bf828b0cc25.png)

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,768 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.