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

后端 未结 5 1324
情歌与酒
情歌与酒 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 18:29

    In May of 2014 with release version 1.0 of socket.IO, binary support has been added to the library.

    Socket.IO now supports emitting Buffer (from Node.JS), Blob, ArrayBuffer and even File, as part of any datastructure

    It's all due to low level api which is provided by engine.io.

提交回复
热议问题