-
Notifications
You must be signed in to change notification settings - Fork 304
Stream file directly to client #53
Comments
I suggest using the aws SDK directly. I don't think there would be a benefit to adding downloadStream to this module. The aws SDK already supports downloading a stream. |
Hi, @andrewrk, I used your The aws SDK already supports downloading a stream. >> yes but don't want to use too many modules to do similar things. My code is already a big pile of mess :| |
I advise against using |
@andrewrk I would assume it would be quite handy to have the feature to directly stream files to the client. |
Alright. I'll add |
Thanks that would be great. I really appreciate your work on this module. Thanks. |
@andrewrk Any updates on this addition? |
Not yet. |
Thanks for adding this. Is this update going to npm any time soon? |
Yeah. There are a few other issues I want to solve with this release though. I observed some weird behavior in master branch and I want to figure out what it was before releasing. |
Sorry for the delay. |
Is there a way to stream file directly to client without saving it in the server? I have also posted a question on this issue here: http://stackoverflow.com/questions/26312294/streaming-files-directly-to-client-from-amazon-s3-node-js
I have pasted the question below:
I am using
sails.js
and am trying to stream files from the Amazon s3 server directly to the client.To connect to S3, I use the s3 Module : https://www.npmjs.org/package/s3 This module provides capabilities like client.downloadFile(params) and client.downloadBuffer(s3Params).
My current code looks like the following:
I catch this buffer in a controller using:
Is it possible to stream this data as an image file (using
buffer.pipe(res)
doesn't work of course). But is there something similar to completely avoid saving file to server disk first?The other option
client.downloadFile(params)
requires a local path (i.e. a server path in our case)The text was updated successfully, but these errors were encountered: