Fix dl issue
This commit is contained in:
@@ -173,9 +173,9 @@ export class AppComponent implements OnInit {
|
||||
|
||||
downloadFileFromAPI(filePath: string, filename: string, job: any) {
|
||||
job.isDownloading = true;
|
||||
this.videoProcessingService.downloadFile(filePath).subscribe({
|
||||
this.videoProcessingService.downloadFile(`${job.data.mp4Filename}/${filename}`).subscribe({
|
||||
next: (response) => {
|
||||
const blob = new Blob([response], { type: 'video/mp4' });
|
||||
const blob = new Blob([response], { type: 'video/mkv' });
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
|
||||
@@ -31,8 +31,8 @@ export class VideoProcessingService {
|
||||
return this.http.post<any>(`${this.apiUrl}/processUpdate`, data);
|
||||
}
|
||||
|
||||
downloadFile(filePath: string): Observable<Blob> {
|
||||
return this.http.get(`${this.apiUrl}/download${filePath}`, { responseType: 'blob' });
|
||||
downloadFile(filename: string): Observable<Blob> {
|
||||
return this.http.get(`${this.apiUrl}/download?filename=${encodeURIComponent(filename)}`, { responseType: 'blob' });
|
||||
}
|
||||
|
||||
flushQueue(): Observable<any> {
|
||||
|
||||
Reference in New Issue
Block a user