<input type="file" id="file" name="file" /> document.getElementById('file').onchange = function() { // fire the upload here };