我正在尝试将图像转换为字节数组。下面是我的代码,它返回该图像的base64String: $scope.imageAdded = function (files) { function (flowFile, i) { fileReader.onload = function (event) {
var uri = event.targ
我已经使用filereader对象将文件转换为arraybuffer。在IE11中,它可以很好地处理最大20mb的文件。但不适用于200mb文件,结果为null而不是数组缓冲值。 //reads in the file using the fileReader HTML5 API (as an ArrayBuffer
cards = new Array(number of cards);request.responseType = "arraybuffer/alternatively: request.responseType = "blob";
var arrayBuffer= this.respons;
//how do I
因此,我有一个ArrayBuffer,它是我用新的HTML5文件读取器读取的文件内容的ArrayBuffer(),我可以通过执行以下操作将ArrayBuffer转换为Uint8Array。//ab = established and defined ArrayBuffer
//var reversed = reverseUint8Array