JavaScript blob类型转file类型
时间:2019-01-02 17:00:16
收藏:0
阅读:927
var blob = new Blob(byteArrays, { type: contentType }); //blob转file var file = new File([blob], filename, {type: contentType, lastModified: Date.now()}); //或者 var file = new File([byteArrays], filename, {type: contentType, lastModified: Date.now()});
注:该代码适用于Chrome和Firefox,但不适用于IE
转载自:https://stackoverflow.com/questions/27553617/convert-blob-to-file
原文:https://www.cnblogs.com/XuYuFan/p/10209277.html
评论(0)