[BUG] AWS S3 Extension doesn't upload images correctly
Describe the bug
After installing the AWS S3 extension and uploading the product image, the image fails to load and returns ERR_CERT_COMMON_NAME_INVALID error. There are multiple issues when uploading images.
- AWS does not provide SSL certificates for bucket-specific urls and Evershop extension doesn't use generic aws s3 url which are ok with HTTPS.
- When uploading the image, there is missing param
acl: public-readso that images can be available online - the Content-Type is set to
application/octet-streamwhich will download the picture as a file instead of rendering it on the screen. - There is no option to set any settings to correct this or to use Cloudfront.
There's no documentation that explains how to go around this and properly set configure the s3 extension.
To Reproduce Steps to reproduce the behavior:
- Login to dashboard
- Create New Product
- Under Media upload the image
- Image uploads but doesn't display
Expected behavior The product image should display in the dashboard
Background (please complete the following information):
- NodeJS Version 20
- Postgres Version 16.4
- EverShop Version 1.2.2
- OS: [e.g. Window, Ubuntu, Mac-OS] Ubuntu
- Browser [e.g. Chrome, Safari] ANY
Additional context Add any other context about the problem here.
@treoden If you want I can create a PR for this. It should be literally 3 lines of code to get it to work unless you have different plans for this.
Hi @casank25 ,
Sure, Please go ahead.
Thanks again
@treoden I've created a PR. How often do you release the fixes like these to production?
Hi @casank25 ,
This fix is for the extension s3 only it does not make changes to the core. So Let me give it a look and will release the new version for the extension soon.
Thanks
@treoden - any news on s3 release ?