aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/helpers')
-rw-r--r--client/src/app/helpers/utils/upload.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils/upload.ts b/client/src/app/helpers/utils/upload.ts
index 5c2600a0d..d7e1f7237 100644
--- a/client/src/app/helpers/utils/upload.ts
+++ b/client/src/app/helpers/utils/upload.ts
@@ -36,8 +36,12 @@ function buildMessage (name: string, err: Pick<HttpErrorResponse, 'message' | 's
36 } 36 }
37 37
38 if (err.status === HttpStatusCode.PAYLOAD_TOO_LARGE_413) { 38 if (err.status === HttpStatusCode.PAYLOAD_TOO_LARGE_413) {
39 const maxFileSize = err.headers?.get('X-File-Maximum-Size') || '8G' 39 const maxFileSize = err.headers?.get('X-File-Maximum-Size')
40 return $localize`Your ${name} file was too large (max. size: ${maxFileSize})` 40 let message = $localize`Your ${name} file was too large `
41
42 if (maxFileSize) message += $localize` (max. size: ${maxFileSize})`
43
44 return message
41 } 45 }
42 46
43 return err.message 47 return err.message