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

    James

    05/01/2022, 4:12 PM
    that was the exact code
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:12 PM
    Huh...
  • j

    James

    05/01/2022, 4:12 PM
    but, it was weeks ago. So, stuff could have changed
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:12 PM
    Was it not working in prod or in wrangler dev?
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:12 PM
    Oh, true.
  • j

    James

    05/01/2022, 4:12 PM
    prod
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:12 PM
    And I assume with the old bindings?
  • j

    James

    05/01/2022, 4:12 PM
    It was with new bindings
  • e

    Erisa | Support Engineer

    05/01/2022, 4:13 PM
    it appears to work in prod, gimme a moment and i'll upload a 1gb test file that isnt privee
  • e

    Erisa | Support Engineer

    05/01/2022, 4:13 PM
    for my use-case im uploading the files over S3 so i basically took your sharex code and removed all the uploading parts
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:13 PM
    So when returning a huge file like that, I assume the Worker isn't running the whole time (or is it running but not consuming CPU)?
  • j

    James

    05/01/2022, 4:13 PM
    nice, glad it was helpful ๐Ÿ™‚
  • e

    Erisa | Support Engineer

    05/01/2022, 4:14 PM
    here - https://cdn.erisa.uk/misc/1GB.bin
  • j

    James

    05/01/2022, 4:14 PM
    depends what you count as "running" ๐Ÿ˜… With recent Unbound changes, it won't be billed as soon as it starts streaming a response
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:14 PM
    Indeed, it works! And at the fastest speed my internet is capable of so the bottleneck is me not R2 ๐Ÿ˜„
  • j

    James

    05/01/2022, 4:14 PM
    Nice. And a smaller 100kb png works too?
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:15 PM
    Oh, right.
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:15 PM
    What about bundled though?
  • j

    James

    05/01/2022, 4:15 PM
    Streaming a response doesn't consume any meaningful amount of CPU time, last I looked
  • e

    Erisa | Support Engineer

    05/01/2022, 4:15 PM
    You can be the png...

    https://cdn.erisa.uk/Discord_GNzAOpiKfo.pngโ–พ

  • e

    Erisa | Support Engineer

    05/01/2022, 4:15 PM
    and yes it works
  • j

    James

    05/01/2022, 4:16 PM
    awesome. I'll update my code, thanks for confirming ๐Ÿ˜„
  • e

    Erisa | Support Engineer

    05/01/2022, 4:16 PM
    that was uploaded using sharex S3 support
  • e

    Erisa | Support Engineer

    05/01/2022, 4:16 PM
    no worries, happy to test it out
  • e

    Erisa | Support Engineer

    05/01/2022, 4:16 PM
    and thanks for writing such a great example!
  • i

    Isaac McFadyen | YYZ01

    05/01/2022, 4:16 PM
    Cold-start is kinda slow, but I think I remember that being mentioned above as being expected for the short-term.
  • j

    James

    05/01/2022, 4:17 PM
    Yeah cold reads are definitely on the slower side right now, but I'm confident that'll improve over time ๐Ÿ™‚ R2 team is doing great work so far! ๐Ÿงก
  • j

    James

    05/01/2022, 4:22 PM
    huzzah https://github.com/Cherry/ShareX-R2-Cloudflare-Workers/commit/5934cc77dc24e29e677dd3ff8b9edfebfe83bd93
  • e

    Erisa | Support Engineer

    05/01/2022, 4:22 PM
    ๐ŸŽ‰
  • e

    Erisa | Support Engineer

    05/01/2022, 4:27 PM
    Oh yeah another thing I was curious about when I was making this - is it possible to list files that are in a directory from a Worker? Kind of like ListObjects on S3. The use-case is showing a file index for certain directories
1...9899100...1050Latest