class Aws::S3::Presigner

def presigned_url(method, params = {})

Raises:
  • (ArgumentError) - Raises an ArgumentError if `:expires_in`

Options Hash: (**params)
  • :virtual_host (Boolean) -- When `true`, the
  • :secure (Boolean) -- When `false`, a HTTP URL
  • :expires_in (Integer) -- The number of seconds

Parameters:
  • method (Symbol) -- Symbolized method name of the operation you want
def presigned_url(method, params = {})
  if params[:key].nil? or params[:key] == ''
    raise ArgumentError, ":key must not be blank"
  end
  virtual_host = !!params.delete(:virtual_host)
  scheme = http_scheme(params, virtual_host)
  req = @client.build_request(method, params)
  use_bucket_as_hostname(req) if virtual_host
  sign_but_dont_send(req, expires_in(params), scheme)
  req.send_request.data
end