3.5.2 • Published 3 years ago
@artizy-io/strapi-provider-upload-aws-s3-with-endpoint v3.5.2
@artizy-io/strapi-provider-upload-aws-s3-with-endpoint
@artizy-io/strapi-provider-upload-aws-s3-with-endpoint
is an evolution of strapi-provider-upload-aws-s3, simply allowing to configure the aws-s3 space endpoint instead of just the region.
Configurations
See the using a provider documentation for information on installing and using a provider. And see the environment variables for setting and using environment variables in your configs.
The following environment variables shall be defined:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_ENDPOINT
- AWS_BUCKET_NAME
The endpoint and bucket are configured as follow:
./config/plugins.js
module.exports = ({ env }) => {
assert(env('AWS_ACCESS_KEY_ID', undefined));
assert(env('AWS_SECRET_ACCESS_KEY', undefined));
console.log(`AWS_S3 STORAGE ${env('AWS_ENDPOINT')}.${env('AWS_BUCKET_NAME')}`);
return {
upload: {
provider: 'aws-s3-with-endpoint',
providerOptions: {
endpoint: env('AWS_ENDPOINT'),
params: {
Bucket: env('AWS_BUCKET_NAME'),
},
},
},
};
...
};