class ActiveStorage::Service::S3Service
def initialize(bucket:, upload: {}, public: false, **options)
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