diff --git a/frontend/src/components/prompts/UploadFiles.vue b/frontend/src/components/prompts/UploadFiles.vue
index f2336375..1b3d6922 100644
--- a/frontend/src/components/prompts/UploadFiles.vue
+++ b/frontend/src/components/prompts/UploadFiles.vue
@@ -14,7 +14,7 @@
}}
-
{{ speedMbytes }}/s
+
{{ speedText }}/s
{{ formattedETA }} remaining
{{ sentPercent }}% Completed
@@ -88,6 +88,7 @@ const uploadStore = useUploadStore();
const { sentBytes, totalBytes } = storeToRefs(uploadStore);
const byteToMbyte = partial({ exponent: 2 });
+const byteToKbyte = partial({ exponent: 1 });
const sentPercent = computed(() =>
((uploadStore.sentBytes / uploadStore.totalBytes) * 100).toFixed(2)
@@ -95,7 +96,17 @@ const sentPercent = computed(() =>
const sentMbytes = computed(() => byteToMbyte(uploadStore.sentBytes));
const totalMbytes = computed(() => byteToMbyte(uploadStore.totalBytes));
-const speedMbytes = computed(() => byteToMbyte(speed.value));
+const speedText = computed(() => {
+ const bytes = speed.value;
+
+ if (bytes < 1024 * 1024) {
+ const kb = parseFloat(byteToKbyte(bytes));
+ return `${kb.toFixed(2)} KB`;
+ } else {
+ const mb = parseFloat(byteToMbyte(bytes));
+ return `${mb.toFixed(2)} MB`;
+ }
+});
let lastSpeedUpdate: number = 0;
let recentSpeeds: number[] = [];