Created
January 9, 2018 01:37
-
-
Save liangchaoboy/4aaf295b029a1c2902c55449ef076ca9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crc32Blob: function (blob, cb){ | |
var fr = new FileReader(); | |
fr.onload = function(e){ | |
cb(CRC32.buf(new Uint8Array(this.result)).toString(16)); | |
}; | |
fr.readAsArrayBuffer(blob); | |
} | |
post.filesize = chunk.size; | |
upload.crc32Blob(file.getNative(), function(crc32){ | |
console.log(crc32); | |
post.crc32 = crc32; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment