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
Post a Comment