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

    itsmatteomanf

    04/14/2022, 9:06 PM
    Oh yeah, for sure 🙂
  • p

    Peps

    04/14/2022, 9:21 PM
    fingers crossed that we have access to it before the R2 demo on saturday 🤞
  • v

    Vitali

    04/14/2022, 9:46 PM
    @cloudflare/workers-types@3.5.0 is published
  • v

    Vitali

    04/14/2022, 9:46 PM
    it has R2 bindings
  • j

    john.spurlock

    04/14/2022, 9:50 PM
    thanks!
  • j

    john.spurlock

    04/14/2022, 10:54 PM
    include
    should be optional, right?
  • v

    Vitali

    04/15/2022, 4:10 AM
    Yup. A bug in the workers types. It’s actually optional. Will get that updated
  • l

    lmtr0

    04/15/2022, 11:50 AM
    Hmm, from the looks of it, you guys are having a lot of trouble with r2, I wish you all a great day and that everything works out smooth ||(and that there are no errors :))||!
  • k

    kavinplays

    04/15/2022, 12:01 PM
    i mean, looks like normal beta stuff
  • l

    lmtr0

    04/15/2022, 12:02 PM
    ye
  • l

    lmtr0

    04/15/2022, 12:02 PM
    agree
  • v

    Vitali

    04/15/2022, 12:55 PM
    It mostly feels pretty smooth on my end which isn’t good if that’s not what our users are seeing. What trouble are you experiencing?
  • l

    lmtr0

    04/15/2022, 1:00 PM
    I expect no trouble
  • l

    lmtr0

    04/15/2022, 1:00 PM
    I'm wishing everything goes fine
  • s

    stupefied | AS204829

    04/15/2022, 2:28 PM
    aaaahhhh, still no dashboard/API access
  • v

    Vitali

    04/15/2022, 4:11 PM
    @john.spurlock 3.5.1 should have the fix for
    include
    to be optional & for the put to accept a
    Blob
    too.
  • j

    john.spurlock

    04/15/2022, 4:25 PM
    what does putting a
    null
    value do? Is it the same as a delete? Or does a subsequent get return a zero-byte body?
  • j

    john.spurlock

    04/15/2022, 4:33 PM
    also these should probably be
    readonly
  • v

    Vitali

    04/15/2022, 7:34 PM
    The latter
  • v

    Vitali

    04/15/2022, 7:34 PM
    Why?
  • j

    john.spurlock

    04/15/2022, 7:36 PM
    in return positions only, not mutated for subsequent upload or anything
  • j

    john.spurlock

    04/15/2022, 7:38 PM
    also just out of curiosity, why is
    R2Object
    an abstract class vs an interface?
  • v

    Vitali

    04/15/2022, 7:38 PM
    Not sure I follow. Typically the runtime only marks fields as
    readonly
    when they correspond to a view of some key internal state that we don't let you modify. This returned result isn't used by us for anything - you're free to modify it if you like
  • v

    Vitali

    04/15/2022, 7:39 PM
    It's done that way because
    R2Object
    is inherited by
    R2ObjectBody
    .
    R2Object
    is what you get from `list`/`head`,
    R2ObjectBody
    is what is returned from
    get
    . Would interfaces actually work here?
  • j

    john.spurlock

    04/15/2022, 7:43 PM
    yep, a ts interface can extend another interface - for what is essentially idl I would prefer an interface, so mockers don't have an arbitrary class constraint
  • j

    john.spurlock

    04/15/2022, 7:43 PM
    just curious as I see it's used elsewhere outside of the r2 stuff
  • v

    Vitali

    04/15/2022, 7:44 PM
    Probably just a leakage in terms of how our automatic type generation works
  • v

    Vitali

    04/15/2022, 7:44 PM
    I'm not sure it's an easy thing to change
  • j

    john.spurlock

    04/15/2022, 7:44 PM
    ah ok if its a pure data structure that can has no internal bookkeeping, makes sense to relax these
  • j

    john.spurlock

    04/15/2022, 7:47 PM
    here are microsoft's types for the dom as an example - all interfaces, even for subtypes: https://github.com/microsoft/TypeScript/blob/main/lib/lib.dom.d.ts
1...323334...1050Latest