Skip to content

Instantly share code, notes, and snippets.

@xavierRiley
Created January 6, 2012 11:49
Show Gist options
  • Save xavierRiley/1570253 to your computer and use it in GitHub Desktop.
Save xavierRiley/1570253 to your computer and use it in GitHub Desktop.
Setting MIME type of images on S3 recursively using Fog gem
connection.directories.first.files.each {|file| if file.key.match(/jpg$/)
file.content_type = "image/jpg";
file.acl="public-read"
file.save
puts file.key
}; nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment