diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 2816dcf0..303eeaf4 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -105,7 +105,9 @@ export default { ...mapActions(useFileStore, ["removeSelected"]), ...mapActions(useLayoutStore, ["showHover", "closeHovers"]), humanSize: function () { - return this.type == "invalid_link" ? "invalid link" : filesize(this.size); + return this.type == "invalid_link" + ? "invalid link" + : filesize(this.size, { base: 2 }); }, humanTime: function () { if (this.readOnly == undefined && this.user.dateFormat) { diff --git a/frontend/src/components/prompts/Info.vue b/frontend/src/components/prompts/Info.vue index aee4eb9a..09df13cd 100644 --- a/frontend/src/components/prompts/Info.vue +++ b/frontend/src/components/prompts/Info.vue @@ -99,7 +99,7 @@ export default { ]), humanSize: function () { if (this.selectedCount === 0 || !this.isListing) { - return filesize(this.req.size); + return filesize(this.req.size, { base: 2 }); } let sum = 0; @@ -108,7 +108,7 @@ export default { sum += this.req.items[selected].size; } - return filesize(sum); + return filesize(sum, { base: 2 }); }, humanTime: function () { if (this.selectedCount === 0) { diff --git a/frontend/src/views/Share.vue b/frontend/src/views/Share.vue index 9a9b782d..cff13f9a 100644 --- a/frontend/src/views/Share.vue +++ b/frontend/src/views/Share.vue @@ -241,7 +241,7 @@ const humanSize = computed(() => { if (req.value) { return req.value.isDir ? req.value.items.length - : filesize(req.value.size ?? 0); + : filesize(req.value.size ?? 0, { base: 2 }); } else { return ""; }