Address Darwin Core export review comments

This commit is contained in:
karilint
2026-06-15 14:09:24 +03:00
parent 53ac4192ff
commit bbc11e44b9
9 changed files with 79 additions and 35 deletions
@@ -39,6 +39,7 @@ export const OccurrenceDwcExportMenuItem = ({ handleClose }: { handleClose: () =
progressUrl: `${BACKEND_URL}/occurrence/export/dwc-archive/progress/${exportId}`,
filename,
fetchOptions: filteredFetchOptions,
progressFetchOptions: fetchOptions,
notify,
setNotificationMessage,
startMessage: 'Generating DwC-A occurrence ZIP export...',
+3 -1
View File
@@ -9,6 +9,7 @@ type DownloadExportParams = {
url: string
filename: string
fetchOptions?: RequestInit
progressFetchOptions?: RequestInit
notify: Notify
setNotificationMessage: (message: string) => void
startMessage: string
@@ -30,6 +31,7 @@ export const downloadExportFileWithProgress = async ({
url,
filename,
fetchOptions = {},
progressFetchOptions,
notify,
setNotificationMessage,
startMessage,
@@ -53,7 +55,7 @@ export const downloadExportFileWithProgress = async ({
if (!progressUrl) return false
try {
const response = await fetch(progressUrl, fetchOptions)
const response = await fetch(progressUrl, progressFetchOptions ?? fetchOptions)
if (!response.ok) return false
const progress = (await response.json()) as ExportProgress