js-md5-file
v0.6.2
Published
MD5 file in browser.
Downloads
4
Readme
js-md5-file
MD5 file in browser. Base on js-spark-md5.
Installation
npm
$ npm install js-md5-file --save
Usage
Use with npm
var jsMD5File = require('js-md5-file');
var el = document.getElementById('upload');
el.addEventListener('change', handle, false);
function handle(e) {
var file = e.target.files[0];
jsMD5File(file, function (err, md5) {
console.log(md5); // 97027eb624f85892c69c4bcec8ab0f11
},
progress(percent){
console.log(percent); // 0.125
});
}
### Browser compatibility
- IE9+
- Firefox
- Chrome
- Safari
- Opera
### License
[MIT](LICENSE)