I'd be weary of buffering a file in memory if you're going to be
waiting on I/O like a database query for authentication, especially if
you are not imposing a data/file size limit.

IMHO a better route in that case might be to do what formidable does
(especially for files), write the data to disk instead and delete if
it ends up the data is not from an authenticated source. If the
database ends up responding before the end of the incoming data
stream, you could also just destroy the connection immediately and
delete the data saved so far (especially if you are not imposing any
data/file size limits) instead of sending back an HTTP error after the
end of the incoming data stream.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to