spaces 403 when accessing public file through subdomain

August 17, 2019 148 views
DigitalOcean CDN Object Storage

SDK: AWS S3 JS SDK

I’ve created a spaces and assigned a subdomain to it, so upload works fine file is uploaded and can be viewed if using the origin URL while the Edge and Subdomain throw a 403.

Here is the upload code


spaces.putObject({
                            Bucket: storage.bucket,
                            ACL: "public-read",
                            Body: file,
                            Key: key,
                            CacheControl: 'max-age=3'
                            ContentType: fileType
                          })

any configuration I might be missing?

Thank you!

1 comment
Be the first one to answer this question.