Created
January 6, 2012 11:49
-
-
Save xavierRiley/1570253 to your computer and use it in GitHub Desktop.
Setting MIME type of images on S3 recursively using Fog gem
This file contains 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
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