Skip to content

Instantly share code, notes, and snippets.

@devmanhinton
Created December 17, 2013 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devmanhinton/8000335 to your computer and use it in GitHub Desktop.
Save devmanhinton/8000335 to your computer and use it in GitHub Desktop.
bucket = Storage.fetch.buckets["postcard_batch"]
Dir.mkdir('photos/')
bucket.objects.each do |obj|
File.open("photos/#{obj.key}.png", 'wb') do |file|
obj.read do |chunk|
file.write(chunk)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment