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 08:50:54 +0200
commita45e2971f786ede5cfa88118e12d2f5f09eb0286 (patch)
tree36683e57c78b030f72f62b11c4879f576829ecc2 /client/src/app
parent9a64621975097f648f6bf19f15b03ba3820918f2 (diff)
downloadPeerTube-a45e2971f786ede5cfa88118e12d2f5f09eb0286.tar.gz
PeerTube-a45e2971f786ede5cfa88118e12d2f5f09eb0286.tar.zst
PeerTube-a45e2971f786ede5cfa88118e12d2f5f09eb0286.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