Browse Source

Updated bandwidth measurements to use correct units

pull/111/head
Teknikode 6 years ago
parent
commit
1058b040a4
  1. 4
      Teknik/Areas/Upload/Scripts/Download.js
  2. 4
      Teknik/Areas/Upload/Scripts/Upload.js

4
Teknik/Areas/Upload/Scripts/Download.js

@ -46,7 +46,7 @@ function processDownload(key) { @@ -46,7 +46,7 @@ function processDownload(key) {
lastTime = curTime;
lastData = e.data.processed;
var percentComplete = Math.round(e.data.processed * 100 / e.data.total);
setProgress(percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Decrypting [' + getReadableBandwidthString(speed) + ']');
setProgress(percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Decrypting [' + getReadableBandwidthString(speed * 8) + ']');
}
break;
case 'finish':
@ -92,7 +92,7 @@ function processDownload(key) { @@ -92,7 +92,7 @@ function processDownload(key) {
lastTime = curTime;
lastData = e.loaded;
var percentComplete = Math.round(e.loaded * 100 / e.total);
setProgress(percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Downloading File [' + getReadableBandwidthString(speed) + ']');
setProgress(percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Downloading File [' + getReadableBandwidthString(speed * 8) + ']');
}
};

4
Teknik/Areas/Upload/Scripts/Upload.js

@ -217,7 +217,7 @@ function encryptFile(file, callback) { @@ -217,7 +217,7 @@ function encryptFile(file, callback) {
lastTime = curTime;
lastData = e.data.processed;
var percentComplete = Math.round(e.data.processed * 100 / e.data.total);
setProgress(fileID, percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Encrypting [' + getReadableBandwidthString(speed) + ']');
setProgress(fileID, percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Encrypting [' + getReadableBandwidthString(speed * 8) + ']');
}
break;
case 'finish':
@ -306,7 +306,7 @@ function uploadProgress(fileID, lastTime, lastData, evt) { @@ -306,7 +306,7 @@ function uploadProgress(fileID, lastTime, lastData, evt) {
setProgress(fileID, 100, 'progress-bar-success progress-bar-striped active', '', 'Processing Upload');
}
else {
setProgress(fileID, percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Uploading to Server [' + getReadableBandwidthString(speed) + ']');
setProgress(fileID, percentComplete, 'progress-bar-success progress-bar-striped active', percentComplete + '%', 'Uploading to Server [' + getReadableBandwidthString(speed * 8) + ']');
}
}
}

Loading…
Cancel
Save