Can I upload a file to server by socket.io in node.js?

后端 未结 5 1308
情歌与酒
情歌与酒 2020-12-07 18:02

I have a socket.io client to whom socket.io server is listening in node.js. I want to upload a file to server by socket.io. be

5条回答
  •  眼角桃花
    2020-12-07 18:36

    Here is a npm module I wrote that will implement Socket.IO file uploading in your application:

    Socket.IO File Upload

    All you need to give the module is your middleware, your socket, and the file input or drop zone used for uploading files. It will also save the files if you give it a directory. The module takes care of the rest.

提交回复
热议问题