You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,8 @@ This plugin supports the following adapters:
45
45
46
46
However, you can create your own adapter for any third-party service you would like to use.
47
47
48
+
All adapters are implemented `dev` directory's [Payload Config](https://github.com/payloadcms/plugin-cloud-storage/blob/master/dev/src/payload.config.ts). See this file for examples.
49
+
48
50
## Plugin options
49
51
50
52
This plugin is configurable to work across many different Payload collections. A `*` denotes that the property is required.
From there, create the adapter, passing in all of its required properties:
90
94
@@ -97,13 +101,18 @@ const adapter = s3Adapter({
97
101
accessKeyId:process.env.S3_ACCESS_KEY_ID,
98
102
secretAccessKey:process.env.S3_SECRET_ACCESS_KEY,
99
103
}
104
+
// ... Other S3 configuration
100
105
},
101
106
bucket:process.env.S3_BUCKET,
102
107
})
103
108
104
109
// Now you can pass this adapter to the plugin
105
110
```
106
111
112
+
Other S3 Client configuration is documented [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/s3clientconfig.html).
113
+
114
+
Any upload over 50MB will automatically be uploaded using S3's multi-part upload.
115
+
107
116
#### Other S3-Compatible Storage
108
117
109
118
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.
0 commit comments