From 2bc90fb27de6f04f0cdd097b569f7fd75c7cffe5 Mon Sep 17 00:00:00 2001 From: hvangeffen Date: Tue, 11 Jun 2024 15:31:48 +0200 Subject: [PATCH] Rename to fileNameSuffix --- src/lib/download/downloadFiles.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/download/downloadFiles.ts b/src/lib/download/downloadFiles.ts index 108b5c60..511ac83c 100644 --- a/src/lib/download/downloadFiles.ts +++ b/src/lib/download/downloadFiles.ts @@ -70,7 +70,7 @@ export async function downloadFileAttachment( export async function downloadFileWithXhr( url: string, - fileName?: string, + fileNameSuffix?: string, ): Promise { return new Promise((resolve, reject) => { const req = new XMLHttpRequest() @@ -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)