storage = Fog::Storage.new(credentials)
directory = storage.directories.get("bucket")
directory.files.get("object") do |chunk, remaining_bytes, total_bytes|
puts chunk
puts "Remaining: #{remaining_bytes.to_f / total_bytes}%"
end
The block will get called for each chunk (by default each 1MB) and
will include data about the remaining bytes and total_bytes for use
with things like you mentioned. I haven't yet figured out the best
general purpose way to do this on the upload side, but that should at
least help you get part way there on the download side.
Thanks!
wes