Socket
Socket
Sign inDemoInstall

browser-md5-file

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browser-md5-file

MD5 file in browser.


Version published
Weekly downloads
24K
decreased by-7.51%
Maintainers
1
Install size
65.7 kB
Created
Weekly downloads
 

Changelog

Source

1.1.1 (2018-12-25)

Bug Fixes

  • handle processFn (47ccf0d)

<a name="1.1.0"></a>

Readme

Source

browser-md5-file NPM Version

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

Demo

demo

Installation

$ npm i browser-md5-file -S

Usage

import BMF from 'browser-md5-file';

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

Keywords

FAQs

Last updated on 25 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc