This module provides a simple interface for uploading documents and images to Amazon S3 using the AWS SDK. It is designed to work seamlessly with the folder structure of the Media Library plugin, ensuring efficient and organized file management.
-
Folder Organization:
- Uploaded files are stored in their respective folders based on type.
- Follows the folder structure of the Media Library plugin.
-
Thumbnail Management:
- If an uploaded image includes thumbnails, they are automatically placed in a dedicated
thumbnails
folder for easy access and management.
- If an uploaded image includes thumbnails, they are automatically placed in a dedicated
This module simplifies the process of managing media uploads and integrates seamlessly with the Media Library plugin.
This module utilizes the AWS SDK to interact with the following AWS services:
- Amazon S3: For storing, retrieving, and deleting objects.
- S3 Request Presigner: For generating pre-signed URLs to securely upload and access objects.
npm install strapi-provider-upload-aws-s3-v3
yarn add strapi-provider-upload-aws-s3-v3
Variable | Type | Description | Required | Default |
---|---|---|---|---|
providerOptions |
object | Configuration options for the S3 client. See AWS SDK documentation. | yes | N/A |
providerOptions.params |
object | Extra configuration such, bucket,acl etc... | yes | N/A |
providerOptions.params.bucket |
string | The name of the bucket | yes | undefined |
providerOptions.params.acl |
string | Provide type of acl for objects, it can ve private or public-read | yes | undefined |
providerOptions.params.signedUrlExpires |
string | Time of expiration for signed urls | yes | undefined |
providerOptions.params.cdn_url |
string | If you are using a cdn for the url, provide the cdn url. | no | undefined |
module.exports = ({ env }) => ({
//...
upload: {
config: {
provider: "strapi-provider-upload-aws-s3-v3",
providerOptions: {
credentials: AwsCredentialsObject,
region: env("AWS_REGION"),
params: {
acl: env("AWS_ACL", "private"),
signedUrlExpires: env("AWS_SIGNED_URL_EXPIRES", 15 * 60),
bucket: env("AWS_BUCKET"),
},
},
},
},
//...
});
-
Alex Torres - Initial development
- GitHub: atorresbernal
- Email: atorresbernal@lumston.com
-
Reynaldo Javier Salazar Ochoa - Plugin structure design
- GitHub: javiersalazardev
- Email: jsalazar@lumston.com
Feel free to reach out with questions, suggestions, or contributions!