Skip to content

Commit

Permalink
fix: file name on downloaded file
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornole-kodehode committed Mar 6, 2024
1 parent 9f412df commit df7c145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/File/File.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const File = ({ doc, file, handleFileRemoval, downloadButton }: FileProps
}
if (doc) {
const downloadLink = document.createElement('a');
downloadLink.download = `${doc.name}`;
downloadLink.download = `${fileName}`;
downloadLink.href = `data:${doc.contentType};base64,${doc.bytes}`;
downloadLink.click();
}
Expand Down

0 comments on commit df7c145

Please sign in to comment.