-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
add example for file upload with progress #1868
Conversation
Thanks for creating this example @xinst |
Adds example for tracking file upload progress.
@xinst FYI the example is broken... What happens is that the uploader reads the whole thing twice, haven't dug into why but I think it has to do with determining the number of parts. The first read is very fast as the contents are discarded. The second actually seems to be piped to the upload. The sample reports progress by dividing the number of bytes read by two, so what I'm seeing is that it jumps straight to 50%, and then proceeds to 100% at half the actual "speed". I "fixed" it by initializing |
I was test with some small(less than 5MB) and large files when I wrote this sample, it was worked for me at that time when divided by two, it was strange. I didn't met the progress straight jumps to 50%. |
Adds a new example to the S3 service's examples. This example shows how you could use the S3's GetObject API call in conjunction with a custom writer keeping track of progress. Related to #1868, 2468
This is an unsound example: It abuses the knowledge that the input is read twice, and should be named |
I added a simple way to track the upload progress, a little trick only