-
Notifications
You must be signed in to change notification settings - Fork 124
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 support for ReadSeeker for uploads to s3 #114
Comments
I never used s3 sdk and probably will not be. IMHO it's horrible approach to use ReadSeeker for uploads. |
@vbauerster I suspect they use ReadSeeker to be able to re-upload specific parts of the file.
but I suspect this will show wrong results in case you try to re-upload the specific part of the file, it easily can get higher 100% |
That's correct. There is SetCurrent which may help to keep bar in correct state after seek has been called. If you come up with working implementation, PR is welcome. I'm not able to test against s3 api. |
So I started to test and unfortunately it doesn't work completely: |
Ok, I was able to come up with some weird naive solution (although it is not working properly in some circumstances):
Not sure if it is useful for anyone else, but it seems to work. Although you cannot rely on automatic completion and have to disable it and complete the bar manually. |
Unfortunately s3 sdk uses ReadSeeker for uploads.
So in this case it is tricky to wrap a file that you trying to upload: curremt API only allows ReadCloser but not ReadSeeker.
The text was updated successfully, but these errors were encountered: