Report this

What is the reason for this report?

spaces 403 when accessing public file through subdomain

Posted on August 17, 2019

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!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.