Giter Club home page Giter Club logo

Comments (4)

Klowner avatar Klowner commented on July 17, 2024

Good question, I need better documentation.

TussleStorageR2 has a getFile() method which returns an R2File instance.

R2File has a body property which exposes a ReadableStream which handles reassembling the parts in correct order and returning them as a single stream.

If you have thousands of file parts, you will likely need to get a little more creative since you'll probably exhaust the Cloudflare Worker's CPU limits or R2 API call limits, in which case you can devise your own implementation by iterating over the R2File's keys array (which is just an ordered array of R2 object keys representing the file parts).

from tussle.

phpb-com avatar phpb-com commented on July 17, 2024

I really appreciate your prompt reply. Let me dig into it a little more and see what I can do. In the end, I think I would need to go through the S3 backend so I can have the object reassembled into one. I hope for R2 worker bindings to support multipart soon.

from tussle.

Klowner avatar Klowner commented on July 17, 2024

from tussle.

phpb-com avatar phpb-com commented on July 17, 2024

True, but that gets very expensive very quickly, so it is overall cheaper to buffet through other S3 like service

from tussle.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.