Microsoft Graph API | Chunk upload with Postman

Andrin 26 Reputation points

Hello Together

I have a problem that involves uploading chunks with Microsoft Graph API From Postman to Sharepoint.

What am I trying to do:
I am trying to upload a TextFile with a size of 808 bytes to the sharepoint using Postman.
I know that you can upload a file of this size as a whole, but for files larger than 60 MB I have to use the method with the chunks.

  1. Step
  2. Step
    PUT UploadLink
    Content-Length = 404
    Content-Range = bytes 0-403/808
    In Body I choose binary and upload my file.
  3. Step
    PUT UploadLink
    Content-Length = 404
    Content-Range = bytes 404-807/808
    In Body I choose binary and upload my file.

Result I get:
The file can be found in the sharepoint under the name "aaafilename.txt", but the content is wrong.

The File I uploaded:

The file I find on the sharepoint:

I would really appreciate your help



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

Accepted answer
  1. Srinivasa Rao Darna 6,711 Reputation points Microsoft Vendor

    Hi @Andrin ,

    As per the documentation you can upload 60MiB, as you are trying to upload a very small file of 808 bytes, request you to upload at one go using createUploadSession or use simple upload API.

    Soure: driveitem-createuploadsession

    It is recommended to Use resumable file transfers for files larger than 10 MiB (10,485,760 bytes), and files smaller than 10MiB can be uploaded at one by passing the entire content-range.

    Also, there appears to be limitation with files smaller than 4MB using createUploadSession when split into multiple chunks.
    Refer: Upload file using upload session break some content.

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

0 additional answers

Sort by: Most helpful