aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

Make the library threadsafe

Open heaven opened this issue 11 years ago • 2 comments

Currently getting errors like: undefined methodclosed?' for nil:NilClass` when trying to run multiple threads

heaven avatar Jan 09 '15 14:01 heaven

+1 here. Running into the same problem using the library.

aifreedom avatar Apr 29 '15 18:04 aifreedom

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.

Nowaker avatar Sep 23 '20 17:09 Nowaker