Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
service/s3/s3manager: Should be able to track download progress #286
I want to show download progress to my users, which requires getting the total bytes to be downloaded.
I could do a HEAD request first to get this, but it's an additional round trip, and there's no telling if what I download is the same resource that I got the HEAD of.
Having access to
If anyone can suggest a workaround, that would also be very helpful.
This seems like a reasonable workaround to me. If you're worried about the object being concurrently written to while you are downloading it then the initial HEAD request will be the least of your concerns, as the downloader itself is likely making multiple concurrent GET requests-- and the object could theoretically change in between those requests as well.
But I agree that having progress support and totalBytes would be useful. The only problem is that they are not known at the start of the download, so if we exposed this it would likely be via function callback.
you're right. thanks for putting that into perspective.