Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit e11a0fb

Browse files
committed
docs: add more detail on S3 configuration
1 parent eb65340 commit e11a0fb

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ import { s3Adapter } from '@payloadcms/plugin-cloud-storage/s3';
9393

9494
const adapter = s3Adapter({
9595
config: {
96-
endpoint: process.env.S3_ENDPOINT,
9796
credentials: {
9897
accessKeyId: process.env.S3_ACCESS_KEY_ID,
9998
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
@@ -105,6 +104,22 @@ const adapter = s3Adapter({
105104
// Now you can pass this adapter to the plugin
106105
```
107106

107+
#### Other S3-Compatible Storage
108+
109+
If you're running an S3-compatible object storage such as MinIO or Digital Ocean Spaces, you'll have to set the `endpoint` appropriately for the provider.
110+
111+
```js
112+
import { s3Adapter } from '@payloadcms/plugin-cloud-storage/s3';
113+
114+
const adapter = s3Adapter({
115+
config: {
116+
endpoint: process.env.S3_ENDPOINT, // Configure for your provider
117+
// ...
118+
},
119+
// ...
120+
})
121+
```
122+
108123
### GCS Adapter
109124

110125
To use the GCS adapter, you need to have `@google-cloud/storage` installed in your project dependencies. To do so, run `yarn add @google-cloud/storage`.

0 commit comments

Comments
 (0)