-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReadableStream.prototype.pipeTo's first argument must be a WritableStream #64
Comments
It might be possible that you are mixing both native and polyfilled whatwg streams? eg: you are getting a native readable stream from (they are not compatible with eachother) can't say for sure, you need to share some of your code also. If you want to be supportive give this issue a 👍 and maybe even ask if you can help out in some way. I would really like to see proper polyfill using native streams. |
Hi Jimmy! I love the StreamSaver and I have already integrated it in my research code, but I can't integrate the zip. I need to use your library because we believe that most of streams will be big ( > 4gb maybe 10 gb). These binary data (files) in the browser will be stored locally (index db) into chunks of binary data (buffers with 32 mb chunk). I was able to use the StreamSaver to saveAs one of these files in the browser, but I simply can't integrate the conflux (we need it because we have also directories as well). Here is a snippet of my entire code (simplified for your review).
Here is the entire function if it helps https://github.com/Pandora-Protocol/pandora-protocol-reference/blob/d97aa8f18615f758c1a00baa80f145f1e4948368/src/pandora-locations/browser/browser-pandora-locations.js#L107 LE: we do use webpack as well. Any idea of how to fix this issue ? |
@jimmywarting helped me out with great communications and support! He was able to identity the issue and refactor my code to make it working. First issue was that we used native node buffers instead of using whatwg streams. The 2nd issue was that we had to use web-streams-polyfill to make it work. Here is the working code https://github.com/Pandora-Protocol/pandora-protocol-reference/blob/7f13e460d64060e7b73a06cdb40ce65a2c7b69ac/src/pandora-locations/browser/browser-pandora-locations.js#L111 Thank you so much again for taking the time to support the research code we do and for integrating conflux into our code. |
Trying to follow example 1 https://github.com/transcend-io/conflux/blob/master/example/pipes/index.js in browser and I get
ReadableStream.prototype.pipeTo's first argument must be a WritableStream
. Any idea ?The text was updated successfully, but these errors were encountered: