aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-14 11:52:15 +0100
committerChocobozzz <me@florianbigard.com>2019-01-14 11:52:15 +0100
commitb5487ff4a5c0bb2acaca79ee00df26a83886c889 (patch)
tree0cfc804405b05fb4b6a26b5e6d122fea30b883ee
parent744d0eca195bce7dafeb4a958d0eb3c0046be32d (diff)
downloadPeerTube-b5487ff4a5c0bb2acaca79ee00df26a83886c889.tar.gz
PeerTube-b5487ff4a5c0bb2acaca79ee00df26a83886c889.tar.zst
PeerTube-b5487ff4a5c0bb2acaca79ee00df26a83886c889.zip
Add error message when trying to upload .ass subtitles
-rw-r--r--client/src/app/shared/forms/reactive-file.component.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/reactive-file.component.ts b/client/src/app/shared/forms/reactive-file.component.ts
index c3986838f..f60c38e8d 100644
--- a/client/src/app/shared/forms/reactive-file.component.ts
+++ b/client/src/app/shared/forms/reactive-file.component.ts
@@ -53,6 +53,17 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
53 return 53 return
54 } 54 }
55 55
56 const extension = '.' + file.name.split('.').pop()
57 if (this.extensions.includes(extension) === false) {
58 const message = this.i18n(
59 'PeerTube cannot handle this kind of file. Accepted extensions are {{extensions}}.',
60 { extensions: this.allowedExtensionsMessage }
61 )
62 this.notifier.error(message)
63
64 return
65 }
66
56 this.file = file 67 this.file = file
57 68
58 this.propagateChange(this.file) 69 this.propagateChange(this.file)