ActiveStorage::S3Service
Inherits ActiveStorage::Service < Reference < Object
Constructors
Instance methods
headers_for_direct_upload(key : String, content_type : String | Nil, content_length : Int64, checksum : String | Nil, filename : String | Nil = nil) : Hash(String, String)
Headers the client sends with the presigned PUT (all four are the signed ones from url_for_direct_upload plus the gem's Content-Disposition, oracle s3du_headers).
upload(key : String, data : String | Bytes, checksum : String | Nil = nil, content_type : String | Nil = nil) : Nil
Sourceurl(key : String, expires_in : Int32 = 300, disposition : String | Nil = nil, filename : String | Nil = nil, content_type : String | Nil = nil) : String
Presigned GET URL (the gem's S3Service#url for private buckets).
url_for_direct_upload(key : String, expires_in : Int32, content_type : String | Nil, content_length : Int64, checksum : String | Nil) : String
Presigned PUT URL for direct uploads — the aws-sdk shape the gem
produces (object.presigned_url(:put, content_type:, content_md5:, whitelist_headers: ["content-length"]), oracle s3du_url_shape):
query-SigV4, UNSIGNED-PAYLOAD, SignedHeaders
"content-length;content-md5;content-type;host" (the client must
send Content-Length/Content-MD5/Content-Type with the body).