Check for name property on appended form values.#163
Check for name property on appended form values.#163DylanPiercey wants to merge 1 commit intoform-data:masterfrom DylanPiercey:master
Conversation
|
Seems like bunch of unhappy things, although it might be preexisting condition. I'm a bit confused on "formidable stream" part. I always considered formidable to be on the receiving end only. Can you elaborate a bit more? Thanks. |
|
@alexindigo It doesn't look like the issues stem from this PR. As far as the formidable bit goes I may have gotten confused. For Rill (the body parser) I use formidable files but convert them to a read stream, so I guess you can't use formidable files asis with form-data. Still however I think this is a nicety for isomorphic libs since https://developer.mozilla.org/en/docs/Web/API/File and https://github.com/felixge/node-formidable#user-content-formidablefile both expose a "name" property. I don't think there would be any negatives to this PR except allowing more apis to work with form-data. |
There was a problem hiding this comment.
My main concern that value.name could be many different things
and we might end up with bunch of false positives.
Can you provide separate integration test instead of augmenting existing custom filename test,
it would better illustrate the use case and would allow for better understanding why we have that piece of code six months from now :)
|
Meanwhile I'll cleanup preexisting triggers. |
| 'Content-Type': [].concat(contentType || []) | ||
| }; | ||
|
|
||
| // allow custom headers. |
There was a problem hiding this comment.
|
Messed this one up by force pushing -_-. |
This allows correct filename parsing from formidable streams and libraries that mimic the browser api such as "node-file-api" by checking for a ".name" property on appended streams.
@alexindigo what are your thoughts on this?