File permissions for Digital Ocean Spaces + CDN

default discord avatar
8 months ago

Hey, so I'm using the official cloud storage plugin configured with the S3 adapter for DO spaces and my files upload correctly however they're all being uploaded with "private" permissions by default and there doesn't seem to be a way to change that; therefore any files I upload isn't publicly accessible by end users via the CDN.

I tried enabling

disablePayloadAccessControl: true,

in case it did something internally but it didn't help in this regard.

Short of hacking the plugin, is there another solution people have?

Ok found the solution, just add

acl: 'public-read',

into your adapter config and then all uploaded files will be public in the bucket

  • default discord avatar
    3 weeks ago

    Thank you for not only posting this question but your solution to it -- it's helped me solve the same issue over 8 months later

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.