Storage Bucket is not allowed to grant Public Access with a subdomain configured
I created a new Storage bucket in my R2 dashboard. I purchased and configrued a sub-domain to allow public access for the bucket objects. However, it says, 'Public URL Access Not Allowed'. I do not understnad why this is happening as I have set up a subdomain. I do not see any option or setting to allow public acess for this bucket. The API keys are set tot object read and write as well.
8 Replies
Its just confusing terminology, "public access" in that case refers to the R2.dev subdomain, if you linked a custom domain you'll still have public access on that domain
Thank you for clarifying that, I went ahead and pasted a URL from an image object in the bucket into my browser and it worked. However, I am still receiivng 404 errors when fetching the images in my App that I am developing. Any idea as to why that is happening?
hard for me to guess without knowing the url, but maybe its misunderstanding paths? there was a bug at one point where it would incorrectly urlencode / in paths
yeah, I am not too sure, everytime I test the URL in a different browser it works. Are there any settings in the domain that I need to configure?
there are no settings
I cant help with your case without knowing at least the pathname youre testing with, because it works fine for my files
so good news, i just figured it out. my fetching logic was a bit off in the way that the JSON was being decoded. I just tested it and the image now fetched!
Now my only problem is uploading images right from my app. Would you be able to provide nay insight on that as well or not really?
you'd likely want to use the S3-compatible api using one of the available libraries or sdks
I just tried it with pre-signing the images and that appeared to work. Is that a viable option when scaling?