support big files (>250 MB)
Opened this issue · 3 comments
Hello,
the Calculating the SHA256 digest does support files larger than 150MB as i have Hashed a Document that was 254.8 MB (254,803,968 bytes) but it still seems to fail when uploading anything over about 1.5GB to 4GB
It has to do with some files not Hashing the SHA256 Digest properly on client-side JS library crypto.js
The problem is in the FileReader Javascript function.
Chrome 45, for example, does not allow files bigger than 261 MB. Sadly, e.target.result returns an empty string, without any other error.
reader.onload = function(e) {
var data = e.target.result;
....
}
This means that all files larger than 261 MB are returning e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, which is the SHA256 hash of the empty string.
I have tried myself to stop the process if data=="" , but it works at first and in later tests it brings the unwelcome Chrome message "Aw, Snap!". So maybe it is better to just check the size of the file being evaluated first and inform the user that the maximum acceptable size is 250 MB.