Skip to content

Commit

Permalink
Rename to fileNameSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
hvangeffen committed Jun 18, 2024
1 parent 0a71f01 commit 2bc90fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/download/downloadFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function downloadFileAttachment(

export async function downloadFileWithXhr(
url: string,
fileName?: string,
fileNameSuffix?: string,
): Promise<void> {
return new Promise((resolve, reject) => {
const req = new XMLHttpRequest()
Expand All @@ -97,7 +97,7 @@ export async function downloadFileWithXhr(
const now = toISOString(new Date())
.replaceAll('-', '')
.replaceAll(':', '')
const fallBackFileName = `${now}${fileName ?? '_DATA'}`
const fallBackFileName = `${now}${fileNameSuffix ?? '_DATA'}`

const downloadFileName = headerFileName ?? fallBackFileName
const blobUrl = window.URL.createObjectURL(req.response)
Expand Down

0 comments on commit 2bc90fb

Please sign in to comment.