Add cookie file upload for authenticated downloads

This commit is contained in:
ddmoney420
2026-03-04 13:29:43 -07:00
parent d2e6c079f9
commit 7cfb0c3a1d
4 changed files with 114 additions and 1 deletions
+20
View File
@@ -213,4 +213,24 @@ export class DownloadsService {
catchError(this.handleHTTPError)
);
}
uploadCookies(file: File) {
const formData = new FormData();
formData.append('cookies', file);
return this.http.post<any>('upload-cookies', formData).pipe(
catchError(this.handleHTTPError)
);
}
deleteCookies() {
return this.http.post<any>('delete-cookies', {}).pipe(
catchError(this.handleHTTPError)
);
}
getCookieStatus() {
return this.http.get<any>('cookie-status').pipe(
catchError(this.handleHTTPError)
);
}
}