class Aws::S3::PresignedPost
def initialize(credentials, bucket_region, bucket_name, options = {})
(**options)
-
:server_side_encryption_customer_key_starts_with
(String
) -- -
:server_side_encryption_customer_key
(String
) -- -
:server_side_encryption_customer_algorithm
(String
) -- -
:server_side_encryption_aws_kms_key_id
(String
) -- -
:server_side_encryption
(String
) -- -
:metadata_starts_with
(Hash
) -- -
:metadata
(Hash
) -- -
:website_redirect_location
(String
) -- -
:storage_class
(String
) -- -
:success_action_status
(String
) -- -
:success_action_redirect_starts_with
(String
) -- -
:success_action_redirect
(String
) -- -
:content_length_range
(Range
) -- -
:expires_starts_with
(String
) -- -
:expires
(Time
) -- See {PresignedPost#expires}. -
:content_encoding_starts_with
(String
) -- -
:content_encoding
(String
) -- -
:content_disposition_starts_with
(String
) -- -
:content_disposition
(String
) -- -
:content_type_starts_with
(String
) -- -
:content_type
(String
) -- See {PresignedPost#content_type}. -
:cache_control_starts_with
(String
) -- -
:cache_control
(String
) -- -
:acl_starts_with
(String
) -- -
:acl
(String
) -- See {PresignedPost#acl}. -
:key_starts_with
(String
) -- -
:key
(String
) -- See {PresignedPost#key}. -
:signature_expiration
(Time
) -- Specify when the signature on -
:allow_any
(Sting, Array
) -- -
:url
(String
) -- See {PresignedPost#url}. -
:use_accelerate_endpoint
(Boolean
) -- When `true`,
Parameters:
-
bucket_name
(String
) -- Name of the target bucket. -
bucket_region
(String
) -- Region of the target bucket. -
credentials
(Credentials
) -- Security credentials for signing
def initialize(credentials, bucket_region, bucket_name, options = {}) @credentials = credentials.credentials @bucket_region = bucket_region @bucket_name = bucket_name @accelerate = !!options.delete(:use_accelerate_endpoint) options.delete(:url) if @accelerate # resource methods pass url @url = options.delete(:url) || bucket_url @fields = {} @key_set = false @signature_expiration = Time.now + 3600 @conditions = [{ 'bucket' => @bucket_name }] options.each do |option_name, option_value| case option_name when :allow_any then allow_any(option_value) when :signature_expiration then @signature_expiration = option_value else if @@allowed_fields.include?(option_name) send("#{option_name}", option_value) else raise ArgumentError, "Unsupported option: #{option_name}" end end end end