0.1.6 • Published 5 years ago

md5-hqp v0.1.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

browser-md5-file NPM Version

MD5 file in browser. Base on js-spark-md5.

Demo

demo

Installation

$ npm i md5-hqp -S

Usage

import BMF from 'md5-hqp';

const el = document.getElementById('upload');
const bmf = new BMF();

el.addEventListener('change', handle, false);

function handle(e) {
  const file = e.target.files[0];
  bmf.md5(
    file,
    (err, md5) => {
      console.log('err:', err);
      console.log('md5 string:', md5); // 97027eb624f85892c69c4bcec8ab0f11
    },
    progress => {
      console.log('progress number:', progress);
    },
  );
}

You can abort it before success to md5 :

  bmf.abort();

Browser compatibility

  • IE9+
  • Firefox
  • Chrome
  • Safari
  • Opera

License

MIT

0.1.6

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago