instance method
upload
Ruby on Rails 6.0.6
Since v5.2.8.1Signature
upload(key, io, checksum: nil, content_type: nil, **)
No documentation comment.
Parameters
-
keyreq -
ioreq -
checksumkey = nil -
content_typekey = nil -
kwargskeyrest
Source
# File activestorage/lib/active_storage/service/s3_service.rb, line 21
def upload(key, io, checksum: nil, content_type: nil, **)
instrument :upload, key: key, checksum: checksum do
object_for(key).put(upload_options.merge(body: io, content_md5: checksum, content_type: content_type))
rescue Aws::S3::Errors::BadDigest
raise ActiveStorage::IntegrityError
end
end
Defined in activestorage/lib/active_storage/service/s3_service.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Service::S3Service