Quantcast
Channel: Active questions tagged filereader - Stack Overflow
Viewing all articles
Browse latest Browse all 104

file reader read blob file

$
0
0

i am trying to use filereader to access a blob file located locally, such as c drive, then converts it back to object URL as img src. it is not working, can anyone help this?

never found anyone try to access a blob file from disk. what is the blob file type extension?

const imageOut = document.querySelector('#image-out');

    imageOut.addEventListener('load', () => {        const reader = new FileReader();        reader.addEventListener('load', () => {            var f = File.createFromFileName("file:///C:/blob.blb");               const arrayBuffer = reader.readAsArrayBuffer(f);            const blob = new Blob([arrayBuffer], { type: mimeType });            imageOut.src = URL.createObjectURL(blob);        });    });

empty, not show


Viewing all articles
Browse latest Browse all 104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>