Skip to content

Commit

Permalink
change size and naming
Browse files Browse the repository at this point in the history
  • Loading branch information
boal committed Nov 16, 2023
1 parent 48a29a7 commit 9e8e1d7
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 9e8e1d7

Please sign in to comment.