pillarjs / multiparty

A node.js module for parsing multipart-form data requests which supports streams2
MIT License
1.3k stars 165 forks source link

Receiving files from forms submitted without multipart/form-data #33

Closed whiteb0x closed 10 years ago

whiteb0x commented 10 years ago

I am currently utilizing http://mean.io/ to develop an app. AngularJS relies on a function call while submitting a form, there is no enctype attribute.

The multipart module doesn't fire its form events because there is no file part coming through the response.

I am attempting to run a putStream() to stream files directly to S3 from my controller in my app.

How can this be configured to pick up the part without using an enctype?

A few ideas I had were to force an enctype in the Angular Service controlling my articles.

The other was to wrap the HTML5 FileReader API in an Angular directive to parse the file data as an object, but this ends up with the file in req.body - and I don't think multipart is configured this way.

I can post some code examples of what I have tried if necessary, but hopefully someone has some insight.

andrewrk commented 10 years ago

multiparty is specifically a parser for multipart/form-data. Anything else is outside the scope.