Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
343 views
in Technique[技术] by (71.8m points)

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

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. because my socket.io client is under apache. and socket.io server is in Node.js. I want to code uploading of file in Node.js. But how I can send the file data to the node.js listening to socket.

I have tried the upload of a file using Node.js server. This link is here but the this code does not use the socket.io with this. But my original project is using the socket.io.

Uploading a file in node.js by formidable

How can I do this with the socket.io server?

question from:https://stackoverflow.com/questions/5973825/can-i-upload-a-file-to-server-by-socket-io-in-node-js

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The checked answer is invalid as of Jul 3rd 2012.

Read by yourself this tutorial on NetTuts. This tutorial uses node.js and socket.io to upload a file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...