Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Zip - In Progress response #904

Open
2 of 4 tasks
fftamc opened this issue May 19, 2023 · 1 comment
Open
2 of 4 tasks

Download Zip - In Progress response #904

fftamc opened this issue May 19, 2023 · 1 comment

Comments

@fftamc
Copy link

fftamc commented May 19, 2023

Description of the Issue

We are calling the DownloadZip method to download up to 150 documents at a time. When we call this method, we are sometimes receiving a BoxZipDownloadStatus response containing a BoxZipDownloadState of "In Progress". After working with BOX Support, we have concluded that the state of "In Progress" is still returning a filestream containing the zip files, however they warned that it may not contain all of the files.

If the response has a state of "In Progress" does this mean that we need to re-run the DownloadZip method to get the correct file stream containing all of the files?
Or is there a way that we can have the DownloadZip method wait until we either receive a state of "Succeeded" or "Failed" to know that download is completed?

Steps to Reproduce

We have a document list of 628 documents that we are attempting to download. We have tried downloading all 628 documents at a single time, and we have also tried breaking the download up into 5 separate calls, each containing no more than 150 documents.

While we do get the "In Progress" response back from the DownloadZip method, it is not consistent. Sometimes we will get "Succeeded" from all 5 of the DownloadZip calls. Other times we will get 1-5 "In Progress" responses.
We have been unable to consistently reproduce this issue.

Expected Behavior

Looking at the DownloadZip method, we would expect that the DownloadZip method would not return any response back until the full download has been completed or failed. The response of "In Progress" prevents us from being able to trust that the returned file stream contains all of the requested documents.

Error Message, Including Stack Trace

Screenshots

image

This image shows a returned response of "In Progress" when we attempted to download all 628 documents in one call.

Versions Used

.Net SDK: 4.3.1
Windows: 10

@mwwoda
Copy link
Contributor

mwwoda commented May 22, 2023

I see that the SDK does not check the status of the zip download request before trying to download it. It would be convenient if this check could be done by SDK and it would retry the download request when the status is in_progress. We always welcome PRs!

For now you could probably implement custom logic for downloading zips by constructing a manual api call or retry the zip downloads that failed by calling the DownloadZip method once again.

I have created a ticket to track this is issue internally (SDK-3141), but I can't give any timeframe at the moment when this change will be implemented.

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

No branches or pull requests

7 participants