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

Progress callback for S3Object #648

Closed
amw opened this issue Oct 19, 2014 · 11 comments · Fixed by #2353 or #2359
Closed

Progress callback for S3Object #648

amw opened this issue Oct 19, 2014 · 11 comments · Fixed by #2353 or #2359
Labels
feature-request A feature should be added or improved.

Comments

@amw
Copy link

amw commented Oct 19, 2014

Hi, I would like to indicate progress of a large file upload to my users. Currently it is not supported with the SDK. If I wanted to use a single-part upload only (I don't) I could use the block form of S3Object#write and report how many bytes I've fed to the SDK, but that's not an actual upload - at that point the data is still waiting to be sent. For multipart upload there's not even that.

What do you think about adding a callback to that method? Something like:

progress = -> bytes { ... }
object.write file: path, progress_callback: progress
@trevorrowe
Copy link
Member

This is an interesting suggestion, but we are currently feature locked on the v1 SDK. This would be a great suggestion for the v2 SDK: https://github.com/aws/aws-sdk-core-ruby

@amw
Copy link
Author

amw commented Mar 11, 2015

aws-sdk-core-ruby has been moved back to this repository, but the issues have not been migrated. Maybe it's enough to reopen this issue? The other issue I've opened is amazon-archives/aws-sdk-core-ruby#194.

@trevorrowe trevorrowe added feature-request A feature should be added or improved. Version 2 labels Mar 11, 2015
trevorrowe added a commit that referenced this issue Mar 11, 2015
@trevorrowe
Copy link
Member

@bmedici
Copy link

bmedici commented Sep 1, 2016

Hi there, as I'm integrating an S3 target in rest-ftp-daemon, I was wondering if upload progress was available through a callback method or passing a block, now ?
Any news about this feature ?

@Doug-AWS
Copy link
Contributor

Doug-AWS commented Sep 1, 2016

We've implemented a wait_until method on the S3 client. The Dev Guide has a section that describes the mechanism. See the "Waiters" section of the "Programming with the AWS SDK for Ruby" topic, http://docs.aws.amazon.com/sdk-for-ruby/latest/DeveloperGuide/aws-ruby-sdk-programming.html.

@bmedici
Copy link

bmedici commented Sep 5, 2016

Thanks @Doug-AWS for the pointer. It may be useful to provide a clean and easy way to get a method called with progress information on a Aws::S3::Resource upload_file transfer (callback).

@mullermp
Copy link
Contributor

Reopening - deprecating usage of Feature Requests backlog markdown file.

@mullermp mullermp reopened this Oct 21, 2019
@mullermp mullermp removed the v2 label Oct 21, 2019
@sivagollapalli
Copy link
Contributor

@mullermp Any guidelines so I could take this up?

@mullermp
Copy link
Contributor

@sivagollapalli I'm not sure - it sounds like the original requestor wanted a callback function. Would a built in progress bar suffice?

@trevorrowe
Copy link
Member

A callback function which yields the total object size in bytes and the number of bytes transmitted would be more flexible and then avoids sending data to standard out. Ideally this could be done generically for all streaming input or streaming output operations (which receive or return IO objects).

@siva-wal
Copy link

If s3 supports callback function which sends amount of bytes that has been written then callback would be better. If there is no such thing then @trevorrowe option would be better so developers can render output to some frontend apps using IO objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants