Multipart transport for old browsers. A minmal port of jQuery-File-Upload, without the jQuery part.
Install with component(1):
$ component install eivindfjeldstad/iframe-multipart
var submit = require('iframe-multipart');
var form = document.getElementById('some-multipart-form');
submit(form, function (err, res) {
// all done
});
The response type should always be text/html
. See the example
folder.
If you are responding with user generated content you should probably wrap it in a <textarea>
for security reasons.
Submits form
and calls fn
when done.
MIT