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

@ -84,6 +84,34 @@ $(document).ready(function() {
.style.setProperty('--progress', percentComplete + '%');
$('#progress-text').html(`${percentComplete}%`);
});
fileSender.on('loading', isStillLoading => {
// The file is loading into Firefox at this stage
if (isStillLoading) {
console.log('Processing')
} else {
console.log('Finished processing')
}
})
fileSender.on('hashing', isStillHashing => {
// The file is being hashed
if (isStillHashing) {
console.log('Hashing');
} else {
console.log('Finished hashing')
}
})
fileSender.on('encrypting', isStillEncrypting => {
// The file is being encrypted
if (isStillEncrypting) {
console.log('Encrypting');
} else {
console.log('Finished encrypting')
}
})
fileSender
.upload()
.then(info => {
@ -111,6 +139,7 @@ $(document).ready(function() {
})
.catch(err => {
Raven.captureException(err);
console.log(err);
$('#page-one').hide();
$('#upload-error').show();
});