Skip to content

Instantly share code, notes, and snippets.

@tomharris
Created February 25, 2013 23:06
Show Gist options
  • Save tomharris/5034169 to your computer and use it in GitHub Desktop.
Save tomharris/5034169 to your computer and use it in GitHub Desktop.
Example of the usage of the non thread-safe aws-s3 gem.
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