Add error message when trying to upload .ass subtitles
This commit is contained in:
parent
744d0eca19
commit
b5487ff4a5
1 changed files with 11 additions and 0 deletions
|
@ -53,6 +53,17 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
|
|||
return
|
||||
}
|
||||
|
||||
const extension = '.' + file.name.split('.').pop()
|
||||
if (this.extensions.includes(extension) === false) {
|
||||
const message = this.i18n(
|
||||
'PeerTube cannot handle this kind of file. Accepted extensions are {{extensions}}.',
|
||||
{ extensions: this.allowedExtensionsMessage }
|
||||
)
|
||||
this.notifier.error(message)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
this.file = file
|
||||
|
||||
this.propagateChange(this.file)
|
||||
|
|
Loading…
Reference in a new issue