luggage66/thermite — pull request #4 by luggage66 (2013-11-03 05:15:33+00:00)
Title: file upload structuring recomendation

There is an alternate upload() function (called upload2()) that demos a few things:

* better error handling
* separating web-server concerns from thermite concerns
* splitting streams
* piping streams

I didn't redo any of your logic, just the stream / error handling.

All this one does it archive the file in var/files/{fileId} and also compute the sha1 (dumps to console).