From e95561cdf195d2926e1856ed285c2b86960bc86f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Sep 2017 21:46:44 +0200 Subject: Upload a video to /videos/upload This is an action, not a REST endpoint --- client/src/app/videos/video-edit/video-add.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/src/app/videos/video-edit/video-add.component.ts') 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 768b6fbcd..42b11cd08 100644 --- a/client/src/app/videos/video-edit/video-add.component.ts +++ b/client/src/app/videos/video-edit/video-add.component.ts @@ -95,7 +95,7 @@ export class VideoAddComponent extends FormReactive implements OnInit { this.uploader = new FileUploader({ authToken: this.authService.getRequestHeaderValue(), queueLimit: 1, - url: API_URL + '/api/v1/videos', + url: API_URL + '/api/v1/videos/upload', removeAfterUpload: true }) @@ -166,7 +166,7 @@ export class VideoAddComponent extends FormReactive implements OnInit { } item.onError = (response: string, status: number) => { - // We need to handle manually these cases beceause we use the FileUpload component + // We need to handle manually these cases because we use the FileUpload component if (status === 400) { this.error = response } else if (status === 401) { @@ -181,7 +181,7 @@ export class VideoAddComponent extends FormReactive implements OnInit { } else if (status === 403) { this.error = 'Your video quota is reached, you can\'t upload this video.' } else { - this.error = 'Unknow error' + this.error = 'Unknown error' console.error(this.error) } } -- cgit v1.2.3