Closed lithiumlab closed 4 years ago
I suppose http
vs http-browserify
is not an issue here - formidable does not use http
module). On the other hand it uses quite a few other modules which should be replaced with appropriate browser version - most importantly stream
, events
,util
. The rest (fs
, crypto
, path
, os
) most likely could be ignored but maybe some configuration for browserify would be needed still.
I'm not sure, but I noticed that you passed res
to the formidable (it needs req) and maybe that is the problem.
Seeing as Formidable utilizes the fs module, this task becomes non-trivial. I imagine that you in theory can compile it using fs-level as a provider for fs and memdb as your level store. It would be easier if you could provide us with a working example that easily illustrates the problem (meaning it's easy to run).
What is the use case on the front end ? Closing to keep only relevant open issues but feel free to continue discussion.
Is it possible to achieve this? I have research a lot yet couldn't find anything that works. I'm not sure if http is getting the 'http-browserify' treatment. Docs says it is used automatically.
then using browserify and producing a bundle.js, on index.html i have:
So, far, this looks good enough: Headers content:
Error immediately after:
Any suggestions or hint on what is wrong?