Uploading files to R2 via Transmit (or similar desktop client)

Hey folks,

Does anyone know if it’s possible to upload objects to R2 using Transmit on the Mac? I tried putting the access key, secret and custom endpoint (with account ID) into the client, but it does not seem to connect in S3 mode due to authentication issues.

Because the R2 web client is limited to 300mb, I need a way to upload some large files to my bucket so I can start serving them using pre-signed URL support (which has just been added).

Cheers,
David

Seems to be MacOS only so not something I can actually test - do you have a screenshot of the available options when you added the R2 as an S3 provider?

Sure, basically this with my own details (removed for obvious reasons).

Seems right? I would have expected a few more options somewhere I guess.

What options do you have when configuring a profile, if any?

The ‘process’ should be, which you seem to have already done:

  1. Add in the endpoint address which is <accountid>.r2.cloudflarestorage.com
  2. Add in your access key from when you generated an API token for R2
  3. Add in your secret key from when you generated an API token for R2

The signature version should be SigV4 (which has been the standard for a long time so it more than likely does) and the region should be auto but it’ll also accept us-east-1 which is the default for many tools.

Very strange, I think the issue is localised to Transmit, because when I tried Cyberduck it did work with the same details!

So if anyone has this issue, use Cyberduck (Google It).

You can select “Amazon S3” and then enter the custom endpoint as @KianNH commented above.

Thanks for your help btw! :slight_smile:

Transmit seems like they have a separate provider for Backblaze B2 so I’m sure they’d be open into adding Cloudflare R2 as it’s own.

I’ll reach out to them over email and see if it’s something they’re open to adding since I’m happy to help them get it working.

1 Like

They actually added Backblaze B2 recently so I expect they will add Cloudflare as well. Can you confirm the exact region that should be used with R2? Writing a script at the minute to generate presigned URLs. Is it always “auto” that is passed in to create the signature for R2?

Yeah.

auto is the intended value but for the sake of compatibility with tools that might not allow a region outside of AWS’s published ones, us-east-1 and an empty string will alias to auto.

You’ll also want to make sure you’re using SigV4 as SigV2 will get rejected with a signature error.

Yeah, I think so - fired off the email anyhow.

1 Like

I am guessing pre-signed URLs (file/objectdownloading) is classed as Class B operations pricing wise? Since this is just added it’s not super clear, but I would. guess so…

The fact it’s presigned or not would be irrelevant to pricing/operation counts - same as S3, it’ll depend on the actual operation.

If you make a GetObject URL, that’ll be Class B whereas PutObject would be Class A - https://developers.cloudflare.com/r2/platform/pricing/

Say I had podcast episodes (as MP3s) which I wanted to be publicly available on my WordPress website, is it possible to do this with R2? Was considering using a CDN (like BunnyCDN), but honestly feel R2 might be a better fit for this.

Guessing I will need to setup a “worker” for this.

Currently you’d need a Worker, yeah. Public buckets w/o a Worker are on the way though.

The Worker’s free tier is 100,000 requests per day and the R2 free tier is 10,000,000 downloads per month.

It’d be pretty cheap beyond that with the Worker’s paid plan (Bundled) which is $5 for 10,000,000 requests.

Update for anyone who is wondering.

Thank you for contacting
I’m afraid this Cloudflare R2 isn’t entirely supported at this time, this has been in Beta I believe beginning last month. We’re looking into this though, I believe we have a test account and an engineer is taking a look at this. I’m keeping an open feature request for this, and although I can’t make any promises, I will add your vote. 👍
A bit more info on this, looks like there’s a bit that’s not currently supported for Cloudflare R2 right now:
https://developers.cloudflare.com/r2/platform/s3-compatibility/api/
Looks like currently the server doesn’t support streaming uploads and downloads, but Transmit only does streaming uploads and downloads 😅, so there’s a bit more going on here currently that we’ll need to work around to support.
Sorry for any inconvenience, please let me know if you have any other questions I can answer!

2 Likes

I can confirm that it worked for me on Cyberduck but not Transmit.