mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Address Darwin Core export review comments
This commit is contained in:
@@ -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...',
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user