* update *
as of mid 2009 amazon supports CORS and the upload via your node.js server isn't needed anymore. you can directly upload the file to S3.
with the help of the "connect-form" module you could just upload the file to your server (through normal multipart FORM) and then handle the S3 stuff afterwards ...
node/express code:
app.post('/upload', function (req, res) {
// connect-form additions
req.form.complete(function (err, fields, files) {
// here lies your uploaded file:
var path = files['media']['path'];
// do knox stuff here
});
});
you have to add the following line to the app configuration:
app.configure(function(){
// rest of the config stuff ...
app.use(form({ keepExtensions: true }));
// ...
});