Skip to content

Commit

Permalink
Merge pull request #1604 from SenseNet/fix/2017-download-on-new-page
Browse files Browse the repository at this point in the history
fix: downloaded file should be shown on a new page
  • Loading branch information
hashtagnulla authored May 28, 2024
2 parents 54b46a9 + 648fe6a commit 53bdf63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/sn-hooks-react/src/hooks/use-download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const fakeClick = (obj: EventTarget) => {
export const downloadFile = (name: string, repositoryUrl: string) => {
const saveLink = document.createElement('a')
saveLink.href = `${repositoryUrl}${name}?download`
saveLink.target = '_blank';
fakeClick(saveLink)
}

Expand Down

0 comments on commit 53bdf63

Please sign in to comment.