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
$("input:file").change(function(e){ | |
var input=e.target; | |
// create a new FileReader object, and … | |
var reader=new FileReader(); | |
// … tell it what to do in case of it successfully loading the file | |
reader.onloadend=function(e){ | |
var fileBase64=e.target.result; | |
$(input).siblings("input:text").first().val(fileBase64); |