Skip to content

Commit

Permalink
change size and naming (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
boal authored Nov 17, 2023
1 parent f126550 commit 01af016
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/common/dokumente/DokumenteListe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ export default class DokumenteListe extends Mixins(DokumenteApiRequestMixin, Fie
private getDokumentSizeInSIUnits(dokument: DokumentDto): string {
let size: string;
if (dokument.sizeInBytes < 1000) {
if (dokument.sizeInBytes < 1024) {
size = dokument.sizeInBytes + " Byte";
} else if (dokument.sizeInBytes < 1000000) {
size = _.round(dokument.sizeInBytes / 1000, 1) + " Kilobyte";
} else if (dokument.sizeInBytes < 1048576) {
size = _.round(dokument.sizeInBytes / 1024, 1) + " KB";
} else {
size = _.round(dokument.sizeInBytes / 1000000, 1) + " Megabyte";
size = _.round(dokument.sizeInBytes / 1048576, 1) + " MB";
}
return size;
}
Expand Down

0 comments on commit 01af016

Please sign in to comment.