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 <shahednasser@gmail.com> * line length fixed --------- Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
committed by
GitHub
parent
17d91c276a
commit
85fa90d9c6
@@ -112,6 +112,8 @@ S3_BUCKET=<YOUR_BUCKET_NAME>
|
||||
S3_REGION=<YOUR_BUCKET_REGION>
|
||||
S3_ACCESS_KEY_ID=<YOUR_ACCESS_KEY_ID>
|
||||
S3_SECRET_ACCESS_KEY=<YOUR_SECRET_ACCESS_KEY>
|
||||
S3_CACHE_CONTROL=<YOUR_CACHE_CONTROL>
|
||||
S3_DOWNLOAD_FILE_DURATION=<YOUR_DOWNLOAD_FILE_DURATION_AMOUNT>
|
||||
```
|
||||
|
||||
Where:
|
||||
@@ -121,6 +123,8 @@ Where:
|
||||
3. `<YOUR_BUCKET_REGION>` is the region code of your bucket. For example, `us-east-1`.
|
||||
4. `<YOUR_ACCESS_KEY_ID>` is the Access Key ID that you created for your user.
|
||||
5. `<YOUR_SECRET_ACCESS_KEY>` is the Secret Access Key that you created for your user.
|
||||
6. `<YOUR_CACHE_CONTROL>` 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. `<YOUR_DOWNLOAD_FILE_DURATION_AMOUNT>` 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,
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user