diff options
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.html | 6 | ||||
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-edit/video-add.component.html b/client/src/app/videos/+video-edit/video-add.component.html index 20277423c..193cc55ee 100644 --- a/client/src/app/videos/+video-edit/video-add.component.html +++ b/client/src/app/videos/+video-edit/video-add.component.html | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | <div class="button-file"> | 12 | <div class="button-file"> |
13 | <span>Select the file to upload</span> | 13 | <span>Select the file to upload</span> |
14 | <input #videofileInput type="file" name="videofile" id="videofile" (change)="fileChange()" /> | 14 | <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" /> |
15 | </div> | 15 | </div> |
16 | 16 | ||
17 | <div class="form-group form-group-channel"> | 17 | <div class="form-group form-group-channel"> |
@@ -42,8 +42,8 @@ | |||
42 | <!-- Hidden because we need to load the component --> | 42 | <!-- Hidden because we need to load the component --> |
43 | <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form"> | 43 | <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form"> |
44 | <my-video-edit | 44 | <my-video-edit |
45 | [form]="form" [formErrors]="formErrors" | 45 | [form]="form" [formErrors]="formErrors" |
46 | [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels" | 46 | [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies" [userVideoChannels]="userVideoChannels" |
47 | ></my-video-edit> | 47 | ></my-video-edit> |
48 | 48 | ||
49 | 49 | ||
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 843475647..066f945fc 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
@@ -52,6 +52,10 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
52 | super() | 52 | super() |
53 | } | 53 | } |
54 | 54 | ||
55 | get videoExtensions () { | ||
56 | return this.serverService.getConfig().video.file.extensions.join(',') | ||
57 | } | ||
58 | |||
55 | buildForm () { | 59 | buildForm () { |
56 | this.form = this.formBuilder.group({}) | 60 | this.form = this.formBuilder.group({}) |
57 | this.form.valueChanges.subscribe(data => this.onValueChanged(data)) | 61 | this.form.valueChanges.subscribe(data => this.onValueChanged(data)) |