我使用 URL.createObjectURL 来存储图像文件,然后从对象 URL 取回图像文件:
console.log(droppedImage);
const objectUrl = URL.createObjectURL(droppedImage);
fetch(objectUrl).then(res => res.blob()).then(console.log);
Firefox 上的结果是我想要的:
但是在具有相同图像的 chrome 上:
文件名消失了,我不知道为什么...