Works with any backend npm install Zero dependencies

File Hashing (SHA-256)

Compute SHA-256 hashes using the Web Crypto API for stronger integrity checks.

(function() {
 var logEl = document.getElementById('log');
 function log(m) { var d = document.createElement('div'); d.className='pkg-log-entry'; d.textContent=m; logEl.appendChild(d); logEl.scrollTop=logEl.scrollHeight; }
 new MultipleUpload('#demo', {
 uploadUrl: '/api/upload',
 multiple: true,
 computeHash: true,
 hashAlgorithm: 'sha256',
 onHashComputed: function(task, hash) {
 log(task.fileName + ' SHA-256: ' + hash);
 }
 });
})();

The cryptographic option

hashAlgorithm accepts 'crc32' (the default), 'sha1' and 'sha256'. SHA-256 is the one to use when the hash has to identify content rather than merely detect accidental corruption — deduplication that must not have false positives, or an integrity record you intend to keep.

It costs real time on large files

SHA-256 reads every byte, so hashing happens before the upload can start and the user waits through it. On a multi-gigabyte file that is a visible delay; the component can hash in a Web Worker so the page stays responsive, but the wait itself does not disappear. Where corruption detection is all you need, CRC32 is dramatically cheaper.

A hash computed in the browser describes a file the server has not seen. If the hash decides anything — skipping an upload, trusting a duplicate — the server must compute its own.