sdk-for-flutter icon indicating copy to clipboard operation
sdk-for-flutter copied to clipboard

🚀 Feature: add progress callback on Storage API for downloads (getFileDownload and getFileView)

Open frmatthew opened this issue 3 years ago • 4 comments

🔖 Feature description

Just as Storage.createFile has an optional onProgress callback, it would be very helpful for getFileDownload and getFileView to have an onProgress callback also for the download progress.

Alternatively, the API could allow plugging in custom http clients (such as Dio?) which already have hooks for tracking request/response progress.

🎤 Pitch

This would allow dynamic updating of the UI in response to downloads, especially for larger files. an onProgress callback could update a ProgressBar, indicate to the user the estimated wait time for the download to complete, etc.

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

frmatthew avatar Jul 14 '22 06:07 frmatthew

A workaround for public files is to create the URL manually (see #63) and use a different http client altogether which tracks progress. But this won't work for files requiring authentication.

frmatthew avatar Jul 14 '22 06:07 frmatthew