Created
May 30, 2015 17:06
-
-
Save code-for-coffee/4800f8e04cbed3e80108 to your computer and use it in GitHub Desktop.
FileReader Upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(event) { | |
// select our input DOM element with a type of file | |
var fileInput = $('input[type="file"]')[0]; | |
// select our form, too | |
var form = $('form')[0]; | |
// prevent our form from submitting via POSTBACK | |
$(form).on('submit', function(event) { | |
event.preventDefault(); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment