diff options
Diffstat (limited to 'client/src/app/videos/video-edit')
-rw-r--r-- | client/src/app/videos/video-edit/video-add.component.ts | 27 |
1 files changed, 15 insertions, 12 deletions
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 0653f5ac4..5d6c0e0c7 100644 --- a/client/src/app/videos/video-edit/video-add.component.ts +++ b/client/src/app/videos/video-edit/video-add.component.ts | |||
@@ -16,6 +16,7 @@ import { | |||
16 | VIDEO_TAGS | 16 | VIDEO_TAGS |
17 | } from '../../shared' | 17 | } from '../../shared' |
18 | import { VideoService } from '../shared' | 18 | import { VideoService } from '../shared' |
19 | import { VideoCreate } from '../../../../../shared' | ||
19 | 20 | ||
20 | @Component({ | 21 | @Component({ |
21 | selector: 'my-videos-add', | 22 | selector: 'my-videos-add', |
@@ -98,23 +99,25 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
98 | removeAfterUpload: true | 99 | removeAfterUpload: true |
99 | }) | 100 | }) |
100 | 101 | ||
101 | this.uploader.onBuildItemForm = (item, form) => { | 102 | this.uploader.onBuildItemForm = (item, form: FormData) => { |
102 | const name = this.form.value['name'] | 103 | const formValue: VideoCreate = this.form.value |
103 | const nsfw = this.form.value['nsfw'] | 104 | |
104 | const category = this.form.value['category'] | 105 | const name = formValue.name |
105 | const licence = this.form.value['licence'] | 106 | const nsfw = formValue.nsfw |
106 | const language = this.form.value['language'] | 107 | const category = formValue.category |
107 | const description = this.form.value['description'] | 108 | const licence = formValue.licence |
108 | const tags = this.form.value['tags'] | 109 | const language = formValue.language |
110 | const description = formValue.description | ||
111 | const tags = formValue.tags | ||
109 | 112 | ||
110 | form.append('name', name) | 113 | form.append('name', name) |
111 | form.append('category', category) | 114 | form.append('category', '' + category) |
112 | form.append('nsfw', nsfw) | 115 | form.append('nsfw', '' + nsfw) |
113 | form.append('licence', licence) | 116 | form.append('licence', '' + licence) |
114 | 117 | ||
115 | // Language is optional | 118 | // Language is optional |
116 | if (language) { | 119 | if (language) { |
117 | form.append('language', language) | 120 | form.append('language', '' + language) |
118 | } | 121 | } |
119 | 122 | ||
120 | form.append('description', description) | 123 | form.append('description', description) |