method
new
rails latest stable - Class:
ActiveStorage::Service::S3Service
new(bucket:, upload: {}, public: false, **options)public
No documentation available.
# File activestorage/lib/active_storage/service/s3_service.rb, line 17
def initialize(bucket,, upload: {}, public: false, **options)
@client = Aws::S3::Resource.new(**options)
@bucket = @client.bucket(bucket)
@multipart_upload_threshold = upload.delete(:multipart_threshold) || 100.megabytes
@public = public
@upload_options = upload
@upload_options[:acl] = "public-read" if public?
end