diff options
-rw-r--r-- | client/src/app/shared/forms/reactive-file.component.ts | 11 |
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) |