最佳答案
<input type="file" id="asd"/>
I would like to get the image in base64 once the user chose that (before submitting the form)
Something like :
$(input).on('change',function(){
var data = $(this).val().base64file(); // it is not a plugin is just an example
alert(data);
});
I read about File API and other stuffs, I would like a simple and cross-browsers solution (IE6/IE7 excluded obviously)
Any help appreciated thanks.