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

    Vitali

    04/02/2022, 1:15 AM
    Less on the client connection and more on our end
  • v

    Vitali

    04/02/2022, 1:15 AM
    We'd only have to do the metadata lookup once & then we issue a bunch of get requests on your behalf to the storage nodes in parallel automatically.
  • j

    john.spurlock

    04/02/2022, 1:15 AM
    ah makes sense, that sounds ideal
  • a

    andrew

    04/02/2022, 1:18 AM
    also interesting would be automatic handling of compressed request bodies during uploads (either keep it compressed in object storage, or decompress it before storing it, that decision could be configurable on a per-request basis). i wonder... do browsers even support
    Content-Encoding: deflate
    on POST/PUT request bodies?
  • a

    andrew

    04/02/2022, 1:19 AM
    (e.g.
    fetch()
    in browsers)
  • v

    Vitali

    04/02/2022, 1:21 AM
    Already discussed this previously. Compressing/decompressing things on upload is difficult. Our storage nodes currently force us to tell them the content-length up-front. That means we'd have to buffer the payload up-front. Eventually I'm hoping we can lift that requirement from our storage nodes but it's going to take a while (year+, not weeks/months of effort).
  • a

    andrew

    04/02/2022, 1:22 AM
    ah right right. i vaguely remember this now
  • a

    andrew

    04/02/2022, 1:24 AM
    i'd probably also test the auto-S3-to-R2 feature with some B2 buckets as well
  • a

    andrew

    04/02/2022, 1:25 AM
    that sounds rather convenient rather than doing a full migration of all objects upfront
  • a

    andrew

    04/02/2022, 1:26 AM
    is there somewhere in the dashboard/api to specify the the key/secret for the S3 bucket it's pulling from, or does it only work with public S3 buckets?
  • v

    Vitali

    04/02/2022, 1:29 AM
    We don't have the migrator yet at open beta & I don't think we have timelines to share on that yet. We'll have something else which is kind of related but fits a slightly different niche.
  • v

    Vitali

    04/02/2022, 1:29 AM
    I can't speculate as to how the migrator works but yeah, putting the keys to your S3 bucket in the UI or via APIGW sounds reasonable
  • a

    andrew

    04/02/2022, 1:31 AM
    Ok, yeah. i can't imagine it's a dealbreaker for many so it seems like a good thing to save for later. nice to have, though
  • v

    Vitali

    04/02/2022, 1:39 AM
    I agree. There's so many nice to haves. Some are easier than others and these days I'm having to force myself to focus on the absolutely critical things for launch even if it's only a day or two do add a feature like conditional PutObject :\.
  • a

    andrew

    04/02/2022, 1:40 AM
    i know how that goes ^_^
  • j

    john.spurlock

    04/02/2022, 2:30 PM
    Reading this again with the benefit of morning coffee, noticed the options for
    list
    is missing a
    startAfter
    name option
  • j

    john.spurlock

    04/02/2022, 2:33 PM
    Also it should probably be
    R2Object.key
    instead of name anyway, to match the parameter names in the bucket methods
  • j

    john.spurlock

    04/02/2022, 2:43 PM
    Also, in 2022,
    R2HttpMetadata
    should have CORS headers options (e.g.
    R2HttpMetadata { accessControlAllowOrigin?: string; }
    )
  • s

    sean

    04/02/2022, 5:15 PM
    just dropping by to say that r2 is pretty cool, although i havent tried it yet. looking forward to q2. kian brought me here
  • v

    Vitali

    04/02/2022, 7:43 PM
    We don't actually support startAfter yet in the bindings. I'm not confident of our implementation in the S3 API either. No ETA yet. Good call on R2Object.key - will try to get a fix up for that
  • v

    Vitali

    04/02/2022, 7:55 PM
    Unfortunately, for open beta we didn't have enough time to flush out CORS. Nothing stops you from applying it yourself in a Worker of course but that's not a satisfactory response. S3 has CORS at the bucket level not the object level btw https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html. Some people want object level policies, some people want bucket level. I think S3's approach with using DSLs as an entire approach has been mistaken, as is picking sides between bucket and object (which they're having to choose because of architectural decisions specific to when S3 started and the product suite available to them at the time). I'm trying to get a blog post up around R2 launch outlining what I'm thinking of instead.
  • v

    Vitali

    04/02/2022, 8:01 PM
    i.e.
    accessControlAllowOrigin
    would be as as much of a DSL as S3's XML API. I'm not saying we won't offer you way to specify it via a DSL. It has a benefit of simplicity which can't be ignored.
  • m

    Marcelino Franchini

    04/02/2022, 9:04 PM
    +1 to the Cloudflare Pages approach with the _headers file: https://developers.cloudflare.com/pages/platform/headers/
  • t

    trbodev

    04/02/2022, 11:17 PM
    wait, couldnt you just serve r2 from your own domain and use transform rules to add the CORS header? (if serving r2 from a custom domain is even possible without workers)
  • l

    lmtr0

    04/03/2022, 12:02 AM
    just for curiosity, how much is the free tier?
  • k

    kavinplays

    04/03/2022, 6:54 AM
    or, is there going to be a free tier?
  • v

    Vitali

    04/03/2022, 12:45 PM
    Yes I believe you could
  • a

    andrew

    04/03/2022, 9:44 PM
    hm.. is it possible to create a cname that points to an r2 bucket’s s3 endpoint hostname?
  • v

    Vitali

    04/04/2022, 3:41 PM
    For those in the beta, there's a new release going out shortly. The main change(s) are: * DeleteObjects of > 128 keys now explicitly returns MalformedXML and v4 code 10027 instead of InternalError. We don't support deleting > 128 keys at a time currently. We'll be working on relaxing this to 1000 keys between Open Beta being announced and GA.
  • l

    lmtr0

    04/04/2022, 3:45 PM
    short question, what is GA?
1...171819...1050Latest