SOURCE

console 命令行工具 X clear

                    
>
console
$("#exampleInputFile").on("change", FileChange)

function FileChange(e) {
  var file = e.target.files[0];
  var n = new FileReader;
  n.onerror = function(e) {
    error = "文件读取错误";
  }
  n.onload = function(t) {
    tips = "正在上传...";
    console.log("Start");
    console.log(t.currentTarget.result);
    console.log(file);
    console.log("End");
    //var n = t.currentTarget.result;
    //this.minImg(t);
  }
  n.onloadend = function(e) {}
  n.onloadstart = function(e) {}
  n.onprogress = function(evt) {
   if (evt.lengthComputable) {
var percentLoaded = Math.round((evt.loaded / evt.total)* 100);
        console.log(percentLoaded + '%');console.log(evt);
      }
  }
    //n.readAsDataURL(file);
    //n.readAsDataURL(file);
  n.readAsArrayBuffer(file);
}
<input type="file" name="FileData" id="exampleInputFile">
<p class="help-block">选择要上传的文件</p>

本项目引用的自定义外部资源