Created
December 6, 2014 18:38
-
-
Save 7kaji/945f75dbef27419157d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruby-progressbar' | |
image_file_size = File.size(image_file_size) | |
if File.size(image_url) > 0 | |
progress_bar = ProgressBar.create(:title => "Uploading...", | |
:starting_at => 0, | |
:total => image_file_size, | |
:output => $stderr, | |
:format => '%a |%b>>%i| %p%% %t' | |
) | |
end | |
progress_proc: proc do |step| | |
progress_bar.progress = step | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment