blob-to-base64

1.0.2 • Public • Published

Table of Contents

Convert Blob to base64

Table of Contents

Table of Contents
  • Install
  • Usage
  • Contribute
  • License
  • Install

    Greenkeeper badge

    $ npm install blob-to-base64
    # OR 
    $ yarn add blob-to-base64

    Usage

    const blobToBase64 = require('blob-to-base64')
     
    const button = document.querySelector('.button')
     
    button.addEventListener('click', function (event) {
      const blob = document.querySelector('.input').files[0]
     
      blobToBase64(blob, function (error, base64) {
        if (!error) {
          document.querySelector('.result').innerHTML = base64
        }
      })
     
    })

    Contributing

    Contributions are welcome!

    1. Fork it.
    2. Create your feature branch: git checkout -b my-new-feature
    3. Commit your changes: git commit -am 'Add some feature'
    4. Push to the branch: git push origin my-new-feature
    5. Submit a pull request :D

    Or open up a issue.

    License

    Licensed under the MIT License.

    Readme

    Keywords

    none

    Package Sidebar

    Install

    npm i blob-to-base64

    Weekly Downloads

    310

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    8.49 kB

    Total Files

    11

    Last publish

    Collaborators

    • tiaanduplessis