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

Browserify of formdata does not has submit method #201

Closed
mondwan opened this issue May 10, 2016 · 4 comments
Closed

Browserify of formdata does not has submit method #201

mondwan opened this issue May 10, 2016 · 4 comments

Comments

@mondwan
Copy link

mondwan commented May 10, 2016

Hello,

I have a problem when using this module with browserify. As browser field in package.json in this module honors global.FormData, however, the builtin one does not provide implementation for submit.

I get an exception from the compiled script about submit is not a function as a result.

I am wondering how to tackle this issue? Either overriding behavior of browser field or other alternative implementation are welcome.

@mondwan
Copy link
Author

mondwan commented May 10, 2016

Similar to tickets in #124 and #139

@mxr576
Copy link

mxr576 commented Jun 1, 2016

I have the same problem, I'm trying to browserify the httpsnippet library with webpack, which also depends on this module.
@DylanPiercey Can you help us? How can we do this with/without the isomorphic-form-data module?

@mondwan
Copy link
Author

mondwan commented Jun 1, 2016

My solution is sending request with node-fetch instead of using the submit() from form-data.

In my opinion, form-data and node-fetch play well together.

@DylanPiercey
Copy link
Member

DylanPiercey commented Jun 1, 2016

@mondwan That is the correct solution. As of node-fetch/node-fetch@ffac417 node-fetch will properly use FormData.

Personally I think the "submit" api should be removed as it deviates from creating a server side shim for FormData (as per #124) however this would break a bunch of stuff.

I'm going to close this for now but feel free to ping me if you have any other issues using this module isomorphically.

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

No branches or pull requests

3 participants