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

    kian

    04/22/2022, 6:04 PM
  • k

    kian

    04/22/2022, 6:04 PM
    👍
  • j

    James

    04/22/2022, 6:06 PM
    uhhh, the docs said it would return
    null
    last I checked and not throw an internal error... not sure if that's a bug on my end or R2
  • v

    Vitali

    04/22/2022, 6:07 PM
    frontend worker
  • v

    Vitali

    04/22/2022, 6:07 PM
    You can front with a public worker
  • j

    john.spurlock

    04/22/2022, 6:07 PM
    @Vitali s3 compat bug: Amazon returns a default content-type of
    binary/octet-stream
    on subsequent GETs/HEADs on objects if none is provided on PUT, cf returns no content-type at all
  • j

    James

    04/22/2022, 6:07 PM
    I guess I could
    try..catch
    it, but I wouldn't expect a
    get('invalid')
    to throw an error
  • c

    Chaika

    04/22/2022, 6:07 PM
    Btw, where are the docs for all that? The r2 docs page doesn't seem to have them
  • v

    Vitali

    04/22/2022, 6:08 PM
    invalid is unexpected
  • v

    Vitali

    04/22/2022, 6:08 PM
    BUT
  • j

    James

    04/22/2022, 6:08 PM
    oh I had some other docs. I'm not sure there's much other than the types yet
  • v

    Vitali

    04/22/2022, 6:08 PM
    is the object empty and are you getting from a binding?
  • d

    Deleted User

    04/22/2022, 6:08 PM
    Excuse my stalking but it works perfectly and handles it on ur domain
  • j

    James

    04/22/2022, 6:09 PM
    naw it throws on mine too.

    https://r2-sharex.jross.me/file/2022/03/fake.png▾

    vs

    https://r2-sharex.jross.me/file/2022/03/cb5b54d9-c761-4286-affa-2f8e2fb0f7d7.png▾

  • d

    Deleted User

    04/22/2022, 6:09 PM
    I stalked the wrong subdomain
  • d

    Deleted User

    04/22/2022, 6:09 PM
    oopsie
  • j

    James

    04/22/2022, 6:10 PM
    yeah, specifically: https://github.com/Cherry/ShareX-R2-Cloudflare-Workers/blob/b0eb177baaf499a63d3ad609ab11fb87b3a2f63c/src/routes.mjs#L106
  • k

    kavinplays

    04/22/2022, 6:10 PM
    i tried it on a new 20.04 ubuntu vm with node 16 and it works
  • w

    Walshy | Pages

    04/22/2022, 6:10 PM
    cough James just admit your code is bad
  • j

    James

    04/22/2022, 6:10 PM
    I mean yes it is (mainly due to your bad advice), but not sure it's me this time
  • w

    Walshy | Pages

    04/22/2022, 6:10 PM
    OI!
  • w

    Walshy | Pages

    04/22/2022, 6:11 PM
    My advice is always perfect 😉
  • k

    kian

    04/22/2022, 6:12 PM
    at least his R2 demo works.
  • k

    kian

    04/22/2022, 6:12 PM
  • k

    kian

    04/22/2022, 6:13 PM
    i spent time on my train journeys making images for it and it was nowhere to be seen
  • w

    Walshy | Pages

    04/22/2022, 6:14 PM
    ...
  • w

    Walshy | Pages

    04/22/2022, 6:14 PM
    Kian...
  • w

    Walshy | Pages

    04/22/2022, 6:14 PM
    \/block
  • k

    kian

    04/22/2022, 6:16 PM
    woah too far
  • k

    kian

    04/22/2022, 6:16 PM
    what about the blob brotherhood
1...474849...1050Latest