jquery - Selecting a local file via HTML5 input and sending it via websocket to nodejs server -


this might easy question i'm stuck @ moment.

i have following html code:

<form id="filebuttons">     <input name="file" type="file" accept="text/*">     <button id="uploadbtn" name="upload" type="button">         <span><b>upload</b></span>     </button> </form> 

the user should select file local drive via input type="file". after this, should able upload file clicking button id="uploadbtn". in javascript there has this:

$(uploadbtn).click(function () {     ws.send("some file have had selected before"); }); 

so have no idea how can access selected file , push server. i'll thankful help!


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -