diff --git a/app/models/spree/image.rb b/app/models/spree/image.rb index a8ea22038a..57597fe378 100644 --- a/app/models/spree/image.rb +++ b/app/models/spree/image.rb @@ -62,10 +62,9 @@ module Spree ActiveSupport::JSON.decode(Spree::Config[:s3_headers])) set_attachment_attributes(:bucket, Spree::Config[:s3_bucket]) - # When using S3, we set the URL on property s3_host_name - set_attachment_attributes(:s3_host_name, attachment_definitions[:attachment][:url]) - set_attachment_attributes(:url, ":s3_domain_url") - # :s3_alias_url + # We use :s3_alias_url (virtual host url style) and set the URL on property s3_host_alias + set_attachment_attributes(:s3_host_alias, attachment_definitions[:attachment][:url]) + set_attachment_attributes(:url, ":s3_alias_url") else attachment_definitions[:attachment].delete :storage end