Fix dl issue
All checks were successful
ci / Image build (push) Successful in 2m14s
ci / Deployment (push) Successful in 6s

This commit is contained in:
Joris Bertomeu
2025-08-26 20:10:45 +02:00
parent 0c867d0ce0
commit a750b52832
3 changed files with 5 additions and 4 deletions

View File

@@ -173,9 +173,9 @@ export class AppComponent implements OnInit {
downloadFileFromAPI(filePath: string, filename: string, job: any) { downloadFileFromAPI(filePath: string, filename: string, job: any) {
job.isDownloading = true; job.isDownloading = true;
this.videoProcessingService.downloadFile(filePath).subscribe({ this.videoProcessingService.downloadFile(`${job.data.mp4Filename}/${filename}`).subscribe({
next: (response) => { 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 url = window.URL.createObjectURL(blob);
const a = document.createElement('a'); const a = document.createElement('a');
a.href = url; a.href = url;

View File

@@ -31,8 +31,8 @@ export class VideoProcessingService {
return this.http.post<any>(`${this.apiUrl}/processUpdate`, data); return this.http.post<any>(`${this.apiUrl}/processUpdate`, data);
} }
downloadFile(filePath: string): Observable<Blob> { downloadFile(filename: string): Observable<Blob> {
return this.http.get(`${this.apiUrl}/download${filePath}`, { responseType: 'blob' }); return this.http.get(`${this.apiUrl}/download?filename=${encodeURIComponent(filename)}`, { responseType: 'blob' });
} }
flushQueue(): Observable<any> { flushQueue(): Observable<any> {

View File

@@ -1,3 +1,4 @@
export const environment = { export const environment = {
serviceEndpoint: '/api' serviceEndpoint: '/api'
//serviceEndpoint: 'http://192.168.1.230:6080/api'
}; };