browser-md5-file文件加密值


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', handlefalse);
 
function handle(e{
  const file e.target.files[0];
  bmf.md5(
    file,
    (errmd5=> {
      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();


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM