Switch to s3_alias_url that enabble virtual host type of path

This commit is contained in:
Luis Ramos
2020-10-26 20:27:42 +00:00
committed by Matt-Yorkley
parent 94a815a9ef
commit e879aa1bed

View File

@@ -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