added loading, hashing, and encrypting events for uploader; decrypting and hashing events for the downloader
This commit is contained in:
parent
57c7c475fc
commit
bfdab156e6
4 changed files with 69 additions and 3 deletions
|
@ -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(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue