var file = files[0];
var reader = new FileReader();
reader.onload = function()
{
document.getElementById("filecontent").innerHTML = this.result;
};
reader.readAsText(file);
http://blog.csdn.net/oscar999/article/details/37499743
图片通过转base64上传
原文地址:https://www.cnblogs.com/wangyuyanhello/p/8427492.html