Modern solution:
let blob = await fetch(url).then(r => r.blob());
The url can be an object url or a normal url.
More Related Contents:
- Remember and Repopulate File Input [duplicate]
- How to download a file without using element with download attribute or a server?
- Getting binary (base64) data from HTML5 Canvas (readAsBinaryString)
- Getting byte array through input type = file
- How FileReader.readAsText in HTML5 File API works?
- Writing file to desktop using HTML5 FileSystem API
- Large file upload with WebSocket
- Reading multiple files with Javascript FileReader API one at a time
- Properly Create and Serve PDF Blob via HTML5 File and URL APIs
- How do I pass a URL as a parameter? [closed]
- .index() only for one instance of class [closed]
- How do I scroll to an element using JavaScript?
- HTML5 Canvas vs. SVG vs. div
- Does HTML5 allow drag-drop upload of folders or a folder tree?
- Changing the selected option of an HTML Select element
- Bootstrap close responsive menu “on click”
- jQuery: Why use document.ready if external JS at bottom of page?
- get the data of uploaded file in javascript
- How to render HTML string as real HTML?
- Is it possible to dynamically scale text size based on browser width?
- Submit and onclick not working together
- Google Maps API v3: InfoWindow not sizing correctly
- Why does `childNodes` return a number larger than I expect?
- Can you target an elements parent element using event.target?
- Scroll Position of div with “overflow: auto”
- Show/hide image with JavaScript
- Test if an element can contain text
- Using base64-encoded images with HtmlService in Apps Script
- Changing data content on an Object Tag in HTML
- Communicate between two pages / tabs