method

upload

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: S3Service
upload(key, io, checksum: nil, content_type: nil, **) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/lib/active_storage/service/s3_service.rb, line 19
    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
Register or log in to add new notes.