Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Upload to digitalOcean Space

default discord avatar
thefrontend2 years ago
2

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?

  • discord user avatar
    dribbens
    2 years ago

    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

    should

    be possible.

  • default discord avatar
    thefrontend2 years ago

    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.



    Example:

    adapter: s3Adapter({ config: { endpoint: 'https://fra1.digitaloceanspaces.com', region: 'fra1', credentials: { accessKeyId: <DO_KEY>, secretAccessKey: <DO_SECRET>, }, }, bucket: <DO_BUCKET_NAME>, }),
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.