https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • k

    kian

    04/09/2023, 3:27 AM
    Maybe, but I would never rely on it.
  • k

    kian

    04/09/2023, 3:27 AM
    It's going to be very hard for you to get charged a lot from spam with caching and rate limiting.
  • k

    kian

    04/09/2023, 3:27 AM
    You can put a fairly predictable upper bound on your costs with those.
  • s

    SKRRRTT

    04/09/2023, 3:27 AM
    Does this still work? I need to move 1.5 million files from wasabi to R2 😭 https://github.com/KianNH/cloudflare-worker-s3-to-r2-migration
  • s

    SKRRRTT

    04/09/2023, 3:28 AM
    and cloudflare seems to only support AWS at the moment
  • s

    SKRRRTT

    04/09/2023, 3:32 AM
    ah wait it doesn't seem like this is for what I am looking to do
  • k

    kian

    04/09/2023, 3:55 AM
    It's on-request migration rather than listing & migrating from the other store
  • r

    Ryuntai

    04/09/2023, 6:34 PM
    @Skye sorry to bother you... this is my usage for today and lets estimate that everyday going to be same usage what is my cost gonna be in end of the month? i just can't understand it... it is too tricky.
  • r

    Ryuntai

    04/09/2023, 6:35 PM
    if anyone else could answer i would appreciate it ā¤ļø
  • b

    binaryfire

    04/09/2023, 7:40 PM
    Hi all. Just wondering if Mirage and Polish will work properly for a domain connected to a R2 bucket? Hoping to combine them with a cache everything page rule.
  • c

    Chaika

    04/09/2023, 8:31 PM
    Last time I tested Polish does apply to R2 Buckets, just keep in mind its modifying the request in cache, so the first request is normal/unpolished, and any subsequent requests get the polished version. I assume Mirage is the same, but didn't test it
  • c

    Chaika

    04/09/2023, 8:32 PM
    https://developers.cloudflare.com/r2/pricing/ What's confusing about the pricing there? Just estimate your monthly usage, times the price there There's a unofficial pricing calculator here as well: https://pricing.ceru.dev/r2, and Cloudflare's official one: https://r2-calculator.cloudflare.com/
  • s

    Sid | R2

    04/09/2023, 11:07 PM
    Only three things cost you: Storage, Class A ops & Class B ops. Subtract free usage each of them, then multiply by the rates on https://developers.cloudflare.com/r2/pricing/ Your bill at this moment would be: 1. Storage: (204.19GB - 10GB)*0.015 = $2.91 2. Class A: (0.03041M -1M)*4.50 = 0 3. Class B: (0.01759M - 10M)*0.36 = 0 2.91+0+0 = $2.91
  • r

    Ryuntai

    04/09/2023, 11:08 PM
    Thank you so much.. not only for me but you made it clear for lots of people whom read this.
  • s

    Sid | R2

    04/09/2023, 11:11 PM
    Just note that this is for this single bucket, and your storage/ops will probably go up till April 30, so if they grow linearly, expect a ~$9 bill. (You’ll be the best judge of how much storage and how many ops your buckets will do).
  • r

    Ryuntai

    04/09/2023, 11:13 PM
    I have implemented the api very weird way so it is kind hard to calc that atm... files that are older than 7 days it will be deleted from bucket .. so in the end of the month idk how cloudflare will calc the cost.
  • s

    Sid | R2

    04/09/2023, 11:17 PM
    Have you set up lifecycle rules? If things are being deleted, then the only thing that’ll affect is the storage. In that case, it might be easier for you to calculate costs per day instead of per month. Take your peak daily storage for a day, and multiply it by 0.0005 ($0.015/30), then add them all up.
  • r

    Ryuntai

    04/09/2023, 11:21 PM
    Thank you, and Damn it didn't know it is going to be that cheap šŸ˜„
  • s

    scubes13

    04/10/2023, 1:52 AM
    any eta's on when/if we'll be able to apply API keys against a single R2 bucket? (thus far google is giving me older 2022 posts/etc)...
  • u

    Unsmart | Tech debt

    04/10/2023, 1:55 AM
    https://discord.com/channels/595317990191398933/940663374377783388/1094048877176434728
  • s

    scubes13

    04/10/2023, 2:15 AM
    bless you and thank you šŸ˜„
  • a

    ahmadsidiqi

    04/10/2023, 4:44 AM
    does anyone know if there's yet a way to use the r2 migrator/super slurper https://developers.cloudflare.com/r2/r2-migrator/ where it automatically runs when changes are made to an s3 bucket?
  • h

    harris

    04/10/2023, 5:51 AM
    Hi all, brand new to R2. Looking to build a browser-based video editor where users can upload .mp4's which they can then edit in my application. I'm familiar with S3, but can't seem to find an easy "hello world" of file upload to R2 via node, where should I look?
  • s

    Sid | R2

    04/10/2023, 6:02 AM
    R2 exposes an S3 compatible API that you should be able to use with any S3 client. If you’re talking to R2 from Node, that’s probably best. Here’s an example: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-js-v3/ You can generate the access keys this way: https://developers.cloudflare.com/r2/api/s3/tokens/
  • h

    harris

    04/10/2023, 6:03 AM
    Does this include the npm 'aws-sdk'?
  • h

    harris

    04/10/2023, 6:04 AM
    That's what I've traditionally used
  • s

    Sid | R2

    04/10/2023, 6:04 AM
    Sure does! The example I linked uses it in fact
  • h

    harris

    04/10/2023, 6:04 AM
    Oh great! Thanks
  • h

    harris

    04/10/2023, 6:05 AM
    Does R2 also allow for presigned URLs?
  • s

    Sid | R2

    04/10/2023, 6:06 AM
    Do note that there is some functionality that is not yet implemented: https://developers.cloudflare.com/r2/api/s3/api/ but the ones that exist are fully capable of building real apps with IMO
1...981982983...1050Latest