aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-05 08:50:54 +0200
committerChocobozzz <me@florianbigard.com>2023-06-05 09:00:47 +0200
commitf5a12121fe3077648b0e875bb521f122e3d7f277 (patch)
tree0f8387a2f191424d7f6e1f4575a8a1bbba951e23 /client/src/app
parent1ed1994fffb18a2b0bd74e49b50067ab047f8ab8 (diff)
downloadPeerTube-f5a12121fe3077648b0e875bb521f122e3d7f277.tar.gz
PeerTube-f5a12121fe3077648b0e875bb521f122e3d7f277.tar.zst
PeerTube-f5a12121fe3077648b0e875bb521f122e3d7f277.zip
Don't display unknown information
Diffstat (limited to 'client/src/app')
-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