diff --git a/www/docs/content/plugins/file-service/s3.mdx b/www/docs/content/plugins/file-service/s3.mdx index 1d15cbcada..d8e0b7e7ed 100644 --- a/www/docs/content/plugins/file-service/s3.mdx +++ b/www/docs/content/plugins/file-service/s3.mdx @@ -112,6 +112,8 @@ S3_BUCKET= S3_REGION= S3_ACCESS_KEY_ID= S3_SECRET_ACCESS_KEY= +S3_CACHE_CONTROL= +S3_DOWNLOAD_FILE_DURATION= ``` Where: @@ -121,6 +123,8 @@ Where: 3. `` is the region code of your bucket. For example, `us-east-1`. 4. `` is the Access Key ID that you created for your user. 5. `` is the Secret Access Key that you created for your user. +6. `` is the value for caching the objects in a web browser or CDN network. For example: cache object for 10 hours, `max-age=36000` +7. `` is the expiry duration for a download URL. For example, you can set the value to ``3600`` if you want the download URL to expire in 1 hour. Finally, in `medusa-config.js`, add to the `plugins` array the following new item: @@ -135,6 +139,9 @@ const plugins = [ region: process.env.S3_REGION, access_key_id: process.env.S3_ACCESS_KEY_ID, secret_access_key: process.env.S3_SECRET_ACCESS_KEY, + cache_control: process.env.S3_CACHE_CONTROL, + download_file_duration: + process.env.S3_DOWNLOAD_FILE_DURATION, }, }, ]