Created
February 25, 2013 23:06
-
-
Save tomharris/5034169 to your computer and use it in GitHub Desktop.
Example of the usage of the non thread-safe aws-s3 gem.
This file contains hidden or 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
def upload | |
# ... | |
AWS::S3::Base.establish_connection!( | |
:access_key_id => aws_access_key_id, | |
:secret_access_key => aws_secret_access_key | |
) | |
File.open(file_path) do |file| | |
AWS::S3::S3Object.store(filename, file, bucket_name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment