aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-14 17:06:31 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-14 17:25:36 +0200
commitbfb3a98fac582f104c6d9b8b7242ea2cbb650b91 (patch)
tree24ead7cbbdc785315c406dfba85a55fe5e235d09 /client/src/app/videos/shared
parentd5050d1e097e761685fbaafe6e3d4b8b78d48356 (diff)
downloadPeerTube-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.ts25
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'
2import { Observable } from 'rxjs/Observable' 2import { Observable } from 'rxjs/Observable'
3import 'rxjs/add/operator/catch' 3import 'rxjs/add/operator/catch'
4import 'rxjs/add/operator/map' 4import 'rxjs/add/operator/map'
5import { HttpClient, HttpParams } from '@angular/common/http' 5import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
6 6
7import { Search } from '../../shared' 7import { Search } from '../../shared'
8import { SortField } from './sort-field.type' 8import { SortField } from './sort-field.type'
@@ -14,13 +14,14 @@ import {
14import { Video } from './video.model' 14import { Video } from './video.model'
15import { VideoPagination } from './video-pagination.model' 15import { VideoPagination } from './video-pagination.model'
16import { 16import {
17UserVideoRate, 17 VideoCreate,
18VideoRateType, 18 UserVideoRate,
19VideoUpdate, 19 VideoRateType,
20VideoAbuseCreate, 20 VideoUpdate,
21UserVideoRateUpdate, 21 VideoAbuseCreate,
22Video as VideoServerModel, 22 UserVideoRateUpdate,
23ResultList 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