admin管理员组文章数量:1389187
Is it possible to check if an object is of type Blob in JavaScript?
I'm getting the following error:
TypeError: Argument 1 of FileReader.readAsDataURL does not implement interface Blob.
Is it possible to check if an object is of type Blob in JavaScript?
I'm getting the following error:
Share Improve this question asked May 27, 2017 at 18:14 1.21 gigawatts1.21 gigawatts 17.9k40 gold badges145 silver badges273 bronze badges 2TypeError: Argument 1 of FileReader.readAsDataURL does not implement interface Blob.
- 1 take a look at stackoverflow./questions/20727750/… – Luca Kiebel Commented May 27, 2017 at 18:17
- Thanks. None of the similar search results came up today or I would have seen it was already answered. :) – 1.21 gigawatts Commented May 27, 2017 at 18:30
1 Answer
Reset to default 5using instanceof blob you can check.
var MyBlob = new Blob(['content'], {type : 'text/plain'});
console.log(MyBlob instanceof Blob) // true
本文标签: javascriptHow to check if an object is of type BlobStack Overflow
版权声明:本文标题:javascript - How to check if an object is of type Blob? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744634244a2616727.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论