mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 06:30:53 +03:00
added loading, hashing, and encrypting events for uploader; decrypting and hashing events for the downloader
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user