1.0.0 • Published 3 years ago
strapi-provider-upload-s3-upload-custom-extensions v1.0.0
strapi-provider-upload-aws-s3-custom-extensions
Configurations
This is a fork of official strapi s3 upload
This package allows you to restrict file upload to s3 from Strapi media library with certain extensions restrictions. Just add allowedExtensions
array to your upload provide config
Example
./config/plugins.js
module.exports = ({ env }) => ({
// ...
upload: {
// update provider name
provider: 'aws-s3-custom-extensions',
providerOptions: {
accessKeyId: env('AWS_ACCESS_KEY_ID'),
secretAccessKey: env('AWS_ACCESS_SECRET'),
region: env('AWS_REGION'),
// add allowedExtensions array
allowedExtensions: ['.png', '.jpg', '.webp'],
params: {
Bucket: env('AWS_BUCKET'),
},
},
},
// ...
});
1.0.0
3 years ago