title: Can I upload a file to server by socket.io in node.js?
body: <p>I have a <strong>socket.io client</strong> to whom <strong>socket.io server is listening in node.js</strong>. I want to upload a file to server by <code>socket.io</code>. because my <code>socket.io</code> client is under apache. and <code>socket.io</code> 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.</p>
  
  <p>I have tried the upload of a file using Node.js server. This link is here but the this code does not use the <code>socket.io</code> with this. But my original project is using the <code>socket.io</code>.</p>
  
  <p><a href="http://rahulmehta1.wordpress.com/2011/04/26/uploading-a-file-in-node-js-by-formidable/" rel="noreferrer">Uploading a file in node.js by formidable</a></p>
  
  <p>How can I do this with the <code>socket.io</code> server?</p>