added loading, hashing, and encrypting events for uploader; decrypting and hashing events for the downloader

This commit is contained in:
Abhinav Adduri 2017-07-11 13:30:25 -07:00
parent 57c7c475fc
commit bfdab156e6
4 changed files with 69 additions and 3 deletions

View file

@ -34,6 +34,24 @@ $(document).ready(function() {
}
});
fileReceiver.on('decrypting', isStillDecrypting => {
// The file is being decrypted
if (isStillDecrypting) {
console.log('Decrypting')
} else {
console.log('Done decrypting')
}
})
fileReceiver.on('hashing', isStillHashing => {
// The file is being hashed to make sure a malicious user hasn't tampered with it
if (isStillHashing) {
console.log('Checking file integrity')
} else {
console.log('Integrity check done')
}
})
fileReceiver
.download()
.catch(() => {