Add download video button on player component.

This commit is contained in:
Guillermo Chavez
2022-03-20 23:14:56 -06:00
parent 88cc8d0e81
commit 1980893d9c
4 changed files with 30 additions and 5 deletions

View File

@@ -351,11 +351,13 @@ export class PostsService implements CanActivate {
return this.http.post<GetAllFilesResponse>(this.path + 'getAllFiles', {sort: sort, range: range, text_search: text_search, file_type_filter: file_type_filter}, this.httpOptions);
}
downloadFileFromServer(uid: string, uuid: string = null, sub_id: string = null) {
downloadFileFromServer(uid: string, uuid: string = null, sub_id: string = null, url: string = null, type: string = null) {
const body: DownloadFileRequest = {
uid: uid,
uuid: uuid,
sub_id: sub_id
sub_id: sub_id,
url: url,
type: type
};
return this.http.post(this.path + 'downloadFile', body, {responseType: 'blob', params: this.httpOptions.params});
}