I'm trying to upload media into a digitalOcean space using the
plugin-cloud-storage
. However, I always get the error
region is missing
. Manually adding the region won't solve it, I guess the URL will just be wrong then. Maybe anyone solved this already?
digitalOcean's storage is supposed to be S3 API compliant. There was a community released plugin for s3 uploads that I tested with DO sometime last year. I am pretty confident this should work with the cloud-storage-plugin.
All I can say is this
shouldbe possible.
Ok, I figured it out.
For everyone having the same problem: You need to prepend
https://
to your endpoint and add
region
the same way it's specified in your endpoint.
adapter: s3Adapter({
config: {
endpoint: 'https://fra1.digitaloceanspaces.com',
region: 'fra1',
credentials: {
accessKeyId: <DO_KEY>,
secretAccessKey: <DO_SECRET>,
},
},
bucket: <DO_BUCKET_NAME>,
}),
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.