fix: upload: a dialog should be displayed in case of error

Massimo Melina committed Jun 9, 2025 at 15:18 UTC 8da5bfcf61e59cee04e5610a1201f88665a09651
1 file changed +2 -2
frontend/src/uploadQueue.ts
+2 -2
@@ -234,8 +234,8 @@ export async function startUpload(toUpload: ToUpload, to: string, startingResume
234 }
235 const specifier = (ERRORS as any)[status] || HTTP_MESSAGES[status]
236 toUpload.error = specifier
237 - if (uploadState.errors.push(toUpload)) return
238 - const msg = t('failed_upload', toUpload, "Couldn't upload {name}") + prefix(': ', specifier)
237 + if (uploadState.errors.push(toUpload) > 1) return
238 + const msg = t('failed_upload', { name: toUpload.path }, "Couldn't upload {name}") + prefix(': ', specifier)
239 closeLastDialog?.()
240 closeLastDialog = alertDialog(msg, 'error')?.close
241 }