From c18e70e99fe321d8444573dc1a7bb7c9aa599e66 Mon Sep 17 00:00:00 2001 From: iqre8 <57012516+iqre8@users.noreply.github.com> Date: Sat, 10 Jul 2021 10:40:19 -0300 Subject: [PATCH 1/2] Update file.rb Add website_redirect_location --- lib/fog/aws/models/storage/file.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index 9c0d109fd..a56949b21 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -30,6 +30,7 @@ module Fog attribute :version, :aliases => 'x-amz-version-id' attribute :kms_key_id, :aliases => 'x-amz-server-side-encryption-aws-kms-key-id' attribute :tags, :aliases => 'x-amz-tagging' + attribute :website_redirect_location, :aliases => 'x-amz-website-redirect-location' UploadPartData = Struct.new(:part_number, :upload_options, :etag) @@ -249,6 +250,7 @@ module Fog # @option options [String] storage_class sets x-amz-storage-class HTTP header. Defaults to 'STANDARD'. Or, 'REDUCED_REDUNDANCY' # @option options [String] encryption sets HTTP encryption header. Set to 'AES256' to encrypt files at rest on S3 # @option options [String] tags sets x-amz-tagging HTTP header. For example, 'Org-Id=1' or 'Org-Id=1&Service=MyService' + # @option options [String] website_redirect_location sets x-amz-website-redirect-location HTTP header. For example, 'website_redirect_location=http://www.rubydoc.info/github/fog/fog-aws' # @return [Boolean] true if no errors # def save(options = {}) @@ -266,6 +268,7 @@ module Fog options.merge!(metadata) options['x-amz-storage-class'] = storage_class if storage_class options['x-amz-tagging'] = tags if tags + options['x-amz-website-redirect-location' = website_redirect_location if website_redirect_location options.merge!(encryption_headers) # With a single PUT operation you can upload objects up to 5 GB in size. Automatically set MP for larger objects. From 25d720e55c07c8377dd495f5141bcb2ea72f455d Mon Sep 17 00:00:00 2001 From: iqre8 <57012516+iqre8@users.noreply.github.com> Date: Wed, 14 Jul 2021 15:58:33 -0300 Subject: [PATCH 2/2] Update file.rb Added missing ] --- lib/fog/aws/models/storage/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index a56949b21..b674930b6 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -268,7 +268,7 @@ module Fog options.merge!(metadata) options['x-amz-storage-class'] = storage_class if storage_class options['x-amz-tagging'] = tags if tags - options['x-amz-website-redirect-location' = website_redirect_location if website_redirect_location + options['x-amz-website-redirect-location'] = website_redirect_location if website_redirect_location options.merge!(encryption_headers) # With a single PUT operation you can upload objects up to 5 GB in size. Automatically set MP for larger objects.