@jswork/next-blob2url

1.0.0 • Public • Published

next-blob2url

Get blob url from blob.

version license size download

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.

/@jswork/next-blob2url/

    Package Sidebar

    Install

    npm i @jswork/next-blob2url

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.69 kB

    Total Files

    5

    Last publish

    Collaborators

    • afeiship