aws-s3
aws-s3 copied to clipboard
Make the library threadsafe
Currently getting errors like: undefined methodclosed?' for nil:NilClass` when trying to run multiple threads
+1 here. Running into the same problem using the library.
Don't bother with this library. Use Fog Storage instead.
@storage = Fog::Storage.new fog_config \
provider: 'AWS',
aws_access_key_id: '...',
aws_secret_access_key: '...',
endpoint: 'https://nyc3.digitaloceanspaces.com' # if you're using an S3-compatible service
bucket = @storage.directories.get 'bucket-name'
file = bucket.files.create \
key: 'blah/my-file.png',
body: File.open('/path/to/file'),
public: true
Fog Storage is a modern, actively maintained library and is thread-safe.