Created
April 21, 2017 07:24
-
-
Save donatello/e8f442f92e388bc62f79c6e40d49caf3 to your computer and use it in GitHub Desktop.
Test fog lib's streaming signature issue.
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
require 'fog' | |
s3 = Fog::Storage::AWS.new( | |
aws_access_key_id: 'minio', | |
aws_secret_access_key: 'minio123', | |
endpoint: 'http://localhost:9000', | |
path_style: true | |
) | |
dir = s3.directories.get('test', { max_keys: 1 }) | |
files = dir.files | |
files.create( | |
key: SecureRandom.hex, | |
body: File.open('/tmp/foo'), | |
content_type: 'application/zip', | |
public: false | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment