Pure Node.js file upload (multipart POST) without using a framework

后端 未结 3 896
半阙折子戏
半阙折子戏 2021-01-18 05:32

The third-party libraries \"node-formidable\" and \"express\" come with the ability to handle multipart POST requests (e.g. with a file upload form), but I don\'t want to us

3条回答
  •  感动是毒
    2021-01-18 06:21

    This is a bit old question, but still quite relevant.
    I have been looking for a similar solution and no luck. So decided to do my own which might come handy to some other users.
    GIST: https://gist.github.com/patrikbego/6b80c6cfaf4f4e6c119560e919409bb2

    Nodejs itself recommends (as seen here) formidable, but I think that such a basic functionality should be provided by Nodejs out of the box.

提交回复
热议问题