Skip to content
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

Is it possible to write to memory rather then fs? #216

Closed
eugenekgn opened this issue Jan 25, 2017 · 3 comments
Closed

Is it possible to write to memory rather then fs? #216

eugenekgn opened this issue Jan 25, 2017 · 3 comments

Comments

@eugenekgn
Copy link

I want to write/pipe to some sort of buffer rather than file system, and then send it of to the server in binary format, how would one do that?

@soyuka
Copy link
Contributor

soyuka commented Jan 25, 2017

Just pipe it to your writable stream?

https://github.com/archiverjs/node-archiver/blob/master/examples/express.js#L23 for example

@imravichaudhary
Copy link

Here is a good article explain about creating writable memory stream: http://codewinds.com/blog/2013-08-19-nodejs-writable-streams.html

@ctalkington
Copy link
Member

thanks everyone for chiming in here. closing but most any writable stream should work just fine. the beauty of steams is that the medium doesnt matter as much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants