Class: S3::PresignPutRequest
- Defined in:
- lib/s3/presign_put_request.rb
Constant Summary collapse
- DEFAULT_EXPIRES_IN =
3600
Constants inherited from Request
Request::AWS_ALGORITHM, Request::AWS_REQUEST, Request::SERVICE, Request::UNSIGNED_PAYLOAD
Instance Method Summary collapse
Methods inherited from Request
Constructor Details
This class inherits a constructor from S3::Request
Instance Method Details
#submit(options = nil, bucket:, key:, **kwargs) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/s3/presign_put_request.rb', line 5 def submit( = nil, bucket:, key:, **kwargs ) = ( , kwargs, PresignPutOptions ) expires_in = [ :expires_in ] || DEFAULT_EXPIRES_IN path = "/#{ bucket }/#{ Helpers.encode_key( key ) }" generate_presigned_url( :put, path, expires_in: expires_in, content_type: [ :content_type ] ) end |