CORS for R2/S3 buckets
🚜
ummmm if you’re using the audioUpload component with the directUpload={true} prop, make sure you set the appropriate CORS rules on your bucket (and remove the localhost part before you launch)
this should probably be in the docs for the component, not the field guide but _¯\_(ツ)_/¯
r2 CORS
[ { "AllowedOrigins": [ "*" ], "AllowedMethods": [ "GET", "HEAD" ], "AllowedHeaders": [ "*" ], "ExposeHeaders": [ "ETag" ], "MaxAgeSeconds": 3600 }, { "AllowedOrigins": [ "http://localhost:4321", "http://localhost:3000", "https://yourdomain.com", "https://www.yourdomain.com" ], "AllowedMethods": [ "PUT", "POST", "DELETE" ], "AllowedHeaders": [ "*" ], "ExposeHeaders": [ "ETag" ], "MaxAgeSeconds": 3600 }]