Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to mime-types module to make form-data browserifyable. #89

Closed
wants to merge 1 commit into from

Conversation

dominictarr
Copy link

The reason this module is not browserifyable is because the mime module does not use fs.readFileSync in a compatible way. A pull request to fix this in mime has been open for over a year, but has not merged it (nor given a good reason not to).

request itself has switched to using mime-types instead of mime, request/request#943

The mime-types module is drop-in compatible, and I have also updated all tests and they still pass just the same.

@alexindigo
Copy link
Member

Thank you for the PR. Looks like tests are failing though.

@dominictarr
Copy link
Author

Ah it's only failing on 0.8 though, and the point it fails at is: https://github.com/felixge/node-form-data/blob/master/test/integration/test-ranged-filestream.js#L52

I'm tempted to guess that if we removed that one test it would pass, and that it's probably a stream compat thing... Okay I am adding travis on my branch and checking whether can be fixed easily.

@dominictarr
Copy link
Author

okay I commented out that one line and the tests pass correctly now:
https://travis-ci.org/dominictarr/node-form-data/builds/40387294

@alexindigo
Copy link
Member

#95 was merged, other improvements will be added to 1.0 (trying to make sooner than later).

@alexindigo alexindigo closed this Dec 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants