Class: S3::PresignGetRequest
- Defined in:
- lib/s3/presign_get_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 13 14 |
# File 'lib/s3/presign_get_request.rb', line 5 def submit( = nil, bucket:, key:, **kwargs ) = ( , kwargs, PresignGetOptions ) expires_in = [ :expires_in ] || DEFAULT_EXPIRES_IN path = "/#{ bucket }/#{ Helpers.encode_key( key ) }" generate_presigned_url( :get, path, expires_in: expires_in, response_content_type: [ :response_content_type ], response_content_disposition: [ :response_content_disposition ] ) end |