We're working on a back-office application that will manage many types of files that are going to be served using Cloudflare R2.
Retool has native support for uploading files to S3 which works for us since R2 provides an S3-like API but it seems according to the documentation that AWS is the only possible target for such integration.
Has anyone done something similar? Can we satisfy this requirement using JavaScript instead?
Looking internally, it looks like we don't currently support this with our S3 integration, but we have a bug request on file to look into this further. I can post here if we make any progress on getting this to work with the integration!
We would also like to use Cloudflare R2 as an s3 compatible storage in Retool, but we get the following error message when setting up the resource (button "test connection"):
Test connection failed
The region name 'eu-central-1' is not valid. Must be one of: wnam, enam, weur, eeur, apac, auto
The error message indicates that the region name 'eu-central-1' is not a valid region for the Amazon S3 API. To troubleshoot, you can check if the region name is spelled correctly and if it matches one of the valid region options: wnam, enam, weur, eeur, apac, or auto. Additionally, ensure that you are using the latest version of the Amazon S3 API and that your credentials are correctly configured.
Could you provide a way to set the region manually or fix this issue by using the special region names of Cloudflare R2? See also: Data location ยท Cloudflare R2 docs
Thanks for surfacing this & providing more details. We still have that bug request internally for supporting CloudFlare R2, as several users have reported that it isn't currently working with our S3 integration I'll let the team know another user reached out! I'll post here if we're able to ship a fix
I'm also looking to upload files to R2 - I wanted to see if this is possible either through the native S3 resource or via the REST API integration. Doesn't seem like this thread or the other has the answer
I do see that a few customers have been able to work around this with a REST API (it's not something I've personally tested, but our REST integration should work with any rest api), but, unfortunately, it still doesn't appear to be possible to get our S3 connector working with Cloudflare R2 at the moment.
I'll reach back out if I get any updates internally about supporting this natively
Hi @Floo, Cloudflare R2 support isn't something that's been picked up yet But it wasn't something we removed support for Do any of the listed region names work?
Hi @Tess, in the S3 ressource, there is no option to set the region name independently than the "Retool region".
The region name 'eu-central-1' is not an option that I can change to wnam, enam, weur... It seems Retool build its S3 requests by using the "Retool region" configured in the ressource
Just wanted to chime in on this issue โ I ran into the same roadblock with the fixed region selection in Retool's S3 resource.
However, I found a solution detailed in Cloudflare's documentation: using "us-east-1" as the region acts as an alias for their "auto" region. This essentially bypasses the region constraint.
I tested it out in Retool, and I can confirm that file operations work flawlessly within my apps when using "us-east-1". (As a sidenote, I did encounter a strange issue where the resource editor gave me a 403 error, but using the resource in an app worked fine).
So, it seems we can use the native integration after all, without resorting to a REST API workaround. Hopefully, this helps anyone else facing this issue, and maybe the Retool team can consider incorporating this information into the documentation or the resource itself.