Ah, yes...res.write() on each chunk of data from a fs.createReadStream() on the allowed file. I'm so spoiled by the rich node modules that I forgot how stuff really gets done. On Feb 17, 2012 8:50 PM, "C. Mundi" <[email protected]> wrote:
> Hi Prashanth, > > I'm probably being dense...are you suggesting something like just doing > res.send(buffer) where buffer has been loaded with the file contents (with > some encoding) and res.headers is set to the content type? I wonder if I > could stream that instead of buffering if the file is big. I suppose that > works...I've become too used to a fancy module to solve every problem. > :) Thanks. > On Feb 17, 2012 8:27 PM, "Prashanth" <[email protected]> wrote: > >> Hey Mundi, >> >> On Sat, Feb 18, 2012 at 7:15 AM, C. Mundi <[email protected]> wrote: >> > >> > Good Idea: what you tell me. :) >> > >> >> Why not store the list of files/path the user is entitled to >> see/download in some storage(db). >> >> -- >> regards, >> Prashanth >> twitter: munichlinux >> irc: munichlinux, JSLint, munichpython. >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
