Git Product home page Git Product logo

Comments (6)

okdistribute avatar okdistribute commented on June 9, 2024

@maxogden said:

'idea for downloading huge files:

since the window.saveAs buffers the entire file into memory, causing large files to crash the tab, a workaround would be to use a service worker to download the file using webrtc/http and then proxy that into a local http download. so to the user it appears as a standard download in their download manager UI, as opposed to now where it buffers into memory with no progress UI provided by the browser and then saves all at once'

from dat.land-roadmap.

laurengarcia avatar laurengarcia commented on June 9, 2024

i like service worker idea^^. am still wondering if the service worker will hit memory limits tho. was thinking about a simple workaround for this yesterday that might help with memory limits. for a different project, i did something similar to this by simply batching the data in increments and writing into a temp file.

service worker will also depend on https, so i'll add that to dat.land issues.

from dat.land-roadmap.

okdistribute avatar okdistribute commented on June 9, 2024

it'd be useful if there was a browser-compatible module that accepted a data stream (i.e., zip-stream) and proxied it to the browser's download manager UI

dat.haus could handle downloads differently than the browser, but we should be able to use a streams interface for that too i think

from dat.land-roadmap.

laurengarcia avatar laurengarcia commented on June 9, 2024

this might be helpful:
https://github.com/webrtc/samples/blob/gh-pages/src/content/datachannel/datatransfer/js/main.js#L95

from dat.land-roadmap.

okdistribute avatar okdistribute commented on June 9, 2024

in progress: https://github.com/datproject/dat.land/tree/download-button

from dat.land-roadmap.

okdistribute avatar okdistribute commented on June 9, 2024

I started working on this from the client-side, but ran into issues. It would also not work well with very large .zips. Maybe it would be better to implement this on the server-side?

from dat.land-roadmap.

Related Issues (20)

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.