I have installed strapi-provider-upload-aws-s3 and uploaded file to s3 successfully but is there any way we can change the link to cloudfront instead of using s3 ?
strapi": "3.0.0",
"strapi-provider-upload-aws-s3": "^3.0.0",
config/plugins.js
module.exports = ({ env }) => ({
upload: {
accessKeyId: "xxxxxxxxxx",
secretAccessKey: "xxxxxxxx",
region: "xxxxx",
params: {
Bucket: "xxxxx",
},
cloudfrontIsEnabled: 'Yes',
cloudfrontURL: "xxx.cloudfront.net",
}
}); (edited)
Found old issue but no luck in the new version
I don't think it's possible with current version of strapi and strapi-provider-upload-aws-s3
Your best bet is to fork the provider code, change the url here: https://github.com/strapi/strapi/blob/master/packages/strapi-provider-upload-aws-s3/lib/index.js#L38
and add forked provider to your package.json file
"dependencies": {
...,
"strapi-provider-upload-aws-s3": "git+https://github.com/<YOUR_GITHUB_ACCOUNT>/strapi-provider-upload-aws-s3.git"
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With