question

IngaleNikhilesh-3156 avatar image
0 Votes"
IngaleNikhilesh-3156 asked saldana-msft edited

Zip File is Corrupted after Uploaded using Large File graph API

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



office-sharepoint-onlinemicrosoft-graph-sdkmicrosoft-graph-sites-lists
image.png (8.5 KiB)
image.png (24.1 KiB)
image.png (20.8 KiB)
image.png (102.1 KiB)
image.png (8.6 KiB)
image.png (23.9 KiB)
image.png (20.3 KiB)
image.png (65.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Have you looked at the related one.


0 Votes 0 ·

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered MichaelHan-MSFT commented

Hi @IngaleNikhilesh-3156 ,

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.




image.png (17.4 KiB)
image.png (52.6 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Michael,

Thanks a lot for your reply !!!

The case which you informed about uploading an entire file in one go, is working already and I don't see any damage with the file in the Sharepoint Folder.

99811-capture-1.png

But when you try to Upload File in Chunks and after uploading Final chunk I am getting the Response that the file is Uploaded and I can also see the file but when I try to open the file content then it show me as the file is corrupted,

99757-image.png

Can you please try with Multiple chunks upload file and let me know if it works for you ?

Regards,
Nikhilesh


0 Votes 0 ·
capture-1.png (37.0 KiB)
image.png (97.7 KiB)

@IngaleNikhilesh-3156 ,

In postman, I got the same result as yours if spliting the zip file into multiple byte ranges. The zip file got Corrupted and some file in the folder was missing.

So, I would suggest you upload an entire file in one go.

0 Votes 0 ·