function readFile(binaryFile) {
let reader = new FileReader();
reader.readAsArrayBuffer(binaryFile);
// in success case, do something with result
reader.onload = function() {
console.log(reader.result);
};
// in error case, do something with result
reader.onerror = function() {
console.log(reader.error);
};
}
閱讀此FileReader並嘗試此功能:
最誠摯的問候!