geekape 前端开发 2021-07-17 File对象转Blob URL File 对象 Blob URL 转换代码 const file = event.target.files[0] const fileType = file.type const blob = new Blob([file], { type: fileType || 'application/*' }) const blobUrl = window.URL.createObjectURL(blob) file对象 js 本文系作者 @geekape 原创发布在 极客猿小兵的博客。未经许可,禁止转载。极客猿小兵 » File对象转Blob URL