0

I have a use case where if a user uploads a file and then before it gets uploaded, I want to calculate a checksum on that file within the browser. I found couple of libraries but for files more than 3 GB, the calculation time is too much so was wondering is there any way this can be achieved in JS.

Referred below article:

https://medium.com/@0xVaccaro/hashing-big-file-with-filereader-js-e0a5c898fc98

real_ate
  • 10,861
  • 3
  • 27
  • 48
Bhavya Bansal
  • 257
  • 1
  • 15
  • 4
    The bottleneck is probably reading the file, not calculating the checksum, there's no way around that. – Barmar Aug 09 '19 at 19:27
  • Are you reading the full file into memory to calculate the sum ? Don't do that. Show us your code. – Ebbe M. Pedersen Aug 10 '19 at 11:20
  • found a library which does that which I posted above. So thats the code and I guess they load it in browser or read bytes from local machine. – Bhavya Bansal Aug 12 '19 at 16:37

0 Answers0