Chrome Extension

Get file from input type file jQuery

$('input[type="file"]').change(function(e) {
    var file =[0];
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Return binary data of selected file that you can pass to your form data

If you want to get selected file form input type file in jQuery you can use the code snippet. Same in the javascript, you can pass event to 'onchange' event of input type file and get the selected file.

Search Index Data (The code snippet can also be found with below search text)

selected file from input[type="file"]
jQuery first file from file control
Was this helpful?
Join Devsheet Ask a Question