Zip File is Corrupted after Uploaded using Large File graph API

Ingale Nikhilesh 1 Reputation point
2021-05-25T06:53:57.677+00:00

Hi Team,

I am working on a scenario where I am trying to upload a ZIP file to Upload large file API. (The scenario is built in Postman)

Step 1:
=====

Upload Session API is working Correctly and able to return uploadurl

Step 2:
=====

Using uploadurl to pass data in byte chunks and able to upload data successfully.

Issue:
====

After the ZIP file is uploaded, the size of the zip file and bytes of the zip file is matching with the details which are on my system, but however, the content size which is in that zip file is not matching correctly and due to this the data is lost and poping up as file corrupted

Can you please let me know what correction to be made to upload the content correctly?

(Also if I upload manually and download the same file and check then it looks good)

**File details uploaded using graph API:

=========================
**
99337-image.png

99356-image.png

99343-image.png

Getting Below error when I try to open the zip file after uploading via graph API
99295-image.png

**File details uploaded Manually:

=====================
**
99307-image.png

99382-image.png

99338-image.png

99316-image.png

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-05-26T08:04:47.67+00:00

    Hi @Ingale Nikhilesh ,

    I did a test to upload zip file with graph api, the zip file worked well on my end. You could try to upload file using uploadurl like the below:

    Body:

    99728-image.png

    Header:

    99718-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.