Rails 3 + Paperclip + Amazon S3 + Download All Images -


background

  • i have been running rails 3.x.x app 2+ years on heroku.
  • user-uploaded images stored in amazon s3 bucket via paperclip.

what need

  • i want download images have been uploaded (around 5000 images total) local disk.
  • i'd reduce cost required perform query.

problem

  • my knowledge of how paperclip stores files on s3 has escaped me (the app written 3 years ago).
  • viewing bucket's content within s3 console lists appears meta-data text-files containing link image.
  • i can't seem find image files within bucket (via s3 web console).

solutions?

  • i've tried various applications cyberduck , buckets time out trying request bucket's content.
  • it seems odd production bucket contains meta-data text files describing image's location; why can't see images in console itself?
  • is there easy script can run grab images?

can provide additional information has_attached_file method declared in model?

you assuming have has_attached_file :photo:

model.find_each |record|   puts record.photo.url end 

puts show url. you'll want script iterating on list , fetching them curl or wget.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -