felixge/node-formidable — pull request #136 by dennisg (2012-02-21 20:36:33+00:00)
Title: formidable on heroku

Hi Felix,

I wanted to use formidable on Heroku, but of course that's not possible because of Heroku's restriction on modifying files.

I therefore made some small changes to the incoming_form.js to allow for bypassing the **fs.WriteStream()**. This is done by supplying a constructor function to the formidable.IncomingForm() that will supply its own version of WriteStream. This custom version will then receive the events instead of the WriteStream from the 'fs' module.

This is just a heads up so that you know it is possible (and even moderately easy).

I've made the code backward compatible (no function provided leads to the original call).
a basic example can be found here: https://github.com/dennisg/node-formidable-heroku

Regards, Dennis