Spree.config do |config|
attachment_config = {
s3_credentials: {
access_key_id: 'xxxxxx',
secret_access_key: 'xxxxxx',
bucket: 'testbucket',
},
storage: :s3,
s3_headers: { 'Cache-Control' => 'max-age=31557600' },
s3_protocol: 'https',
bucket: 'testbucket',
styles: {
mini: '48x48>',
small: '100x100>',
product: '240x240>',
large: '600x600>'
},
path: '/public/spree/products/:id/:style/:basename.:extension',
default_url: '/spree/products/:id/:style/:basename.:extension',
default_style: 'product',
}
attachment_config.each do |key, value|
Spree::Image.attachment_definitions[:attachment][key.to_sym] = value
end
end
I can connect and upload with an S3 client fine.
Enter code here...
Peter Berkenbosch
Spree Commerce, Inc.