Skip to content

Instantly share code, notes, and snippets.

@donatello
Created April 21, 2017 07:24
Show Gist options
  • Save donatello/e8f442f92e388bc62f79c6e40d49caf3 to your computer and use it in GitHub Desktop.
Save donatello/e8f442f92e388bc62f79c6e40d49caf3 to your computer and use it in GitHub Desktop.
Test fog lib's streaming signature issue.
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