@jswork/next-blob2url
v1.0.0
Published
Get blob url from blob.
Downloads
4
Maintainers
Readme
next-blob2url
Get blob url from blob.
installation
npm install -S @jswork/next-blob2url
usage
import '@jswork/next-blob2url';
nx.blob2url(blob);
// http://localhost:5000/500e570a-ad09-4921-a4a3-6c72cc84626e
<div class="img-container">
<img id="img" src="" alt="">
</div>
<script>
fetch('./ava.jpg').then(res => res.blob()).then(res => {
const url = nx.blob2url(res);
document.getElementById('img').src = nx.blob2url(res)
console.log(res, url);
})
</script>
license
Code released under the MIT license.