Skip to content

Commit

Permalink
fix: pdf url
Browse files Browse the repository at this point in the history
  • Loading branch information
Regikon committed Dec 16, 2024
1 parent 35a4d0e commit 973be8a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/application/action_creators/cv_action_creators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ async function loadPdf(cvId: number) {
type: CvActions.LoadPdf,
payload: pdf,
});
const pdfBlob = new Blob([pdf.location], { type: 'application/pdf' });
const pdfUrl = URL.createObjectURL(pdfBlob);
const a = document.createElement('a');
a.setAttribute('href', pdfUrl);
a.setAttribute('href', pdf.location);
a.setAttribute('download', 'cv.pdf');
a.click();
} catch (err) {
Expand Down

0 comments on commit 973be8a

Please sign in to comment.