From 85fa90d9c6c82743b4d9e15d83cec66ebc6cecff Mon Sep 17 00:00:00 2001 From: Habibullah Turkmen Date: Mon, 4 Sep 2023 12:24:33 +0430 Subject: [PATCH] docs: updated file-service s3 guide configurations (#4921) * docs: updated file-service s3 guide * update * Update www/docs/content/plugins/file-service/s3.mdx feedback Co-authored-by: Shahed Nasser * line length fixed --------- Co-authored-by: Shahed Nasser --- www/docs/content/plugins/file-service/s3.mdx | 7 +++++++ 1 file changed, 7 insertions(+) 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, }, }, ]