aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/app/videos/video-add/video-add.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-27 17:52:41 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-27 17:52:41 +0200
commit9bfe96e19f552a75eed790f8f3b68de11c9b7fef (patch)
treeea1536162cdfbed0dbbf4fcffc728b69b5e890a6 /client/app/videos/video-add/video-add.component.ts
parent4fd8aa327004b27530fd96bdde5df60e6745a1f6 (diff)
downloadPeerTube-9bfe96e19f552a75eed790f8f3b68de11c9b7fef.tar.gz
PeerTube-9bfe96e19f552a75eed790f8f3b68de11c9b7fef.tar.zst
PeerTube-9bfe96e19f552a75eed790f8f3b68de11c9b7fef.zip
Put presentation logic in the components
Diffstat (limited to 'client/app/videos/video-add/video-add.component.ts')
-rw-r--r--client/app/videos/video-add/video-add.component.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/app/videos/video-add/video-add.component.ts b/client/app/videos/video-add/video-add.component.ts
index b11475ae9..eb10aedeb 100644
--- a/client/app/videos/video-add/video-add.component.ts
+++ b/client/app/videos/video-add/video-add.component.ts
@@ -25,9 +25,9 @@ export class VideoAddComponent implements OnInit {
25 private form: any; 25 private form: any;
26 26
27 constructor( 27 constructor(
28 private router: Router, 28 private authService: AuthService,
29 private elementRef: ElementRef, 29 private elementRef: ElementRef,
30 private authService: AuthService 30 private router: Router
31 ) {} 31 ) {}
32 32
33 ngOnInit() { 33 ngOnInit() {
@@ -62,8 +62,8 @@ export class VideoAddComponent implements OnInit {
62 } 62 }
63 63
64 uploadFile() { 64 uploadFile() {
65 this.form.headers = this.authService.getRequestHeader().toJSON();
66 this.form.formData = jQuery(this.elementRef.nativeElement).find('form').serializeArray(); 65 this.form.formData = jQuery(this.elementRef.nativeElement).find('form').serializeArray();
66 this.form.headers = this.authService.getRequestHeader().toJSON();
67 this.form.submit(); 67 this.form.submit();
68 } 68 }
69} 69}