diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-14 17:06:31 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-14 17:25:36 +0200 |
commit | bfb3a98fac582f104c6d9b8b7242ea2cbb650b91 (patch) | |
tree | 24ead7cbbdc785315c406dfba85a55fe5e235d09 /client/src/app/videos/shared | |
parent | d5050d1e097e761685fbaafe6e3d4b8b78d48356 (diff) | |
download | PeerTube-bfb3a98fac582f104c6d9b8b7242ea2cbb650b91.tar.gz PeerTube-bfb3a98fac582f104c6d9b8b7242ea2cbb650b91.tar.zst PeerTube-bfb3a98fac582f104c6d9b8b7242ea2cbb650b91.zip |
Remove ng2 file upload module
Unmaintained and we don't need it anymore with httpclient
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r-- | client/src/app/videos/shared/video.service.ts | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/client/src/app/videos/shared/video.service.ts b/client/src/app/videos/shared/video.service.ts index b6d2a0666..cfce4cb16 100644 --- a/client/src/app/videos/shared/video.service.ts +++ b/client/src/app/videos/shared/video.service.ts | |||
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core' | |||
2 | import { Observable } from 'rxjs/Observable' | 2 | import { Observable } from 'rxjs/Observable' |
3 | import 'rxjs/add/operator/catch' | 3 | import 'rxjs/add/operator/catch' |
4 | import 'rxjs/add/operator/map' | 4 | import 'rxjs/add/operator/map' |
5 | import { HttpClient, HttpParams } from '@angular/common/http' | 5 | import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http' |
6 | 6 | ||
7 | import { Search } from '../../shared' | 7 | import { Search } from '../../shared' |
8 | import { SortField } from './sort-field.type' | 8 | import { SortField } from './sort-field.type' |
@@ -14,13 +14,14 @@ import { | |||
14 | import { Video } from './video.model' | 14 | import { Video } from './video.model' |
15 | import { VideoPagination } from './video-pagination.model' | 15 | import { VideoPagination } from './video-pagination.model' |
16 | import { | 16 | import { |
17 | UserVideoRate, | 17 | VideoCreate, |
18 | VideoRateType, | 18 | UserVideoRate, |
19 | VideoUpdate, | 19 | VideoRateType, |
20 | VideoAbuseCreate, | 20 | VideoUpdate, |
21 | UserVideoRateUpdate, | 21 | VideoAbuseCreate, |
22 | Video as VideoServerModel, | 22 | UserVideoRateUpdate, |
23 | ResultList | 23 | Video as VideoServerModel, |
24 | ResultList | ||
24 | } from '../../../../../shared' | 25 | } from '../../../../../shared' |
25 | 26 | ||
26 | @Injectable() | 27 | @Injectable() |
@@ -73,6 +74,14 @@ export class VideoService { | |||
73 | .catch(this.restExtractor.handleError) | 74 | .catch(this.restExtractor.handleError) |
74 | } | 75 | } |
75 | 76 | ||
77 | // uploadVideo (video: VideoCreate) { | ||
78 | uploadVideo (video: any) { | ||
79 | const req = new HttpRequest('POST', `${VideoService.BASE_VIDEO_URL}/upload`, video, { reportProgress: true }) | ||
80 | |||
81 | return this.authHttp.request(req) | ||
82 | .catch(this.restExtractor.handleError) | ||
83 | } | ||
84 | |||
76 | getVideos (videoPagination: VideoPagination, sort: SortField) { | 85 | getVideos (videoPagination: VideoPagination, sort: SortField) { |
77 | const pagination = this.videoPaginationToRestPagination(videoPagination) | 86 | const pagination = this.videoPaginationToRestPagination(videoPagination) |
78 | 87 | ||