今天测试文件获取发现文件列表中返回的文件数据是数字组成的数组,内容类似于
[-1, -40, -1, -32, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0......]
转换代码
let fileList = [];
res.data.forEach((item) => {
let blob = new Blob([new Uint8Array(item.data)], {
type: "application/octet-stream",
});
let blobUrl = URL.createObjectURL(blob);
fileList.push({ ...it, url: blobUrl });
});
该文件仅记录个人遇到的问题,如有错误请指正