✨ Surface which files failed during photo upload
A partial upload only told the admin "some files failed" with no way to
find out which ones — even though the data existed. The backend already
returns per-file rejections (response.errors: [{filename, error}]) and the
progress hook already exposes failedPhotos, but both were dropped.
Add a dismissible failure report to the upload modal listing every file
that didn't make it into the gallery, grouped by stage with its reason:
- rejected: per-file validation rejections from the upload response
(previously discarded entirely)
- transfer: whole-chunk request failures (now captured with the error,
not just the filename)
- processing: background-worker failures from useUploadProgress.failedPhotos
Replace the count-only "some files failed" toast with one that points at
the list. Add en/de keys under upload.failures.* and a component test
covering the rejected + processing rows and dismissal.
This commit is contained in:
@@ -169,6 +169,16 @@
|
||||
"retryFailed": "Fehlgeschlagene erneut versuchen",
|
||||
"uploadComplete": "Upload abgeschlossen!",
|
||||
"someFilesFailed": "Einige Dateien konnten nicht hochgeladen werden",
|
||||
"failures": {
|
||||
"title": "{{count}} Datei(en) konnten nicht hochgeladen werden",
|
||||
"toast": "{{count}} Datei(en) konnten nicht hochgeladen werden – siehe Liste unten.",
|
||||
"kindRejected": "Abgelehnt",
|
||||
"kindTransfer": "Übertragung fehlgeschlagen",
|
||||
"kindProcessing": "Verarbeitung fehlgeschlagen",
|
||||
"transferReason": "Übertragung fehlgeschlagen",
|
||||
"unknownReason": "Unbekannter Fehler",
|
||||
"unknownFile": "Unbekannte Datei"
|
||||
},
|
||||
"replaceByName": "Vorhandene Fotos mit gleichem Namen ersetzen",
|
||||
"uploadPhotos": "Fotos hochladen",
|
||||
"uploadMedia": "Fotos & Videos hochladen",
|
||||
|
||||
@@ -169,6 +169,16 @@
|
||||
"retryFailed": "Retry failed",
|
||||
"uploadComplete": "Upload complete!",
|
||||
"someFilesFailed": "Some files failed to upload",
|
||||
"failures": {
|
||||
"title": "{{count}} file(s) could not be uploaded",
|
||||
"toast": "{{count}} file(s) could not be uploaded — see the list below.",
|
||||
"kindRejected": "Rejected",
|
||||
"kindTransfer": "Transfer failed",
|
||||
"kindProcessing": "Processing failed",
|
||||
"transferReason": "Transfer failed",
|
||||
"unknownReason": "Unknown error",
|
||||
"unknownFile": "Unknown file"
|
||||
},
|
||||
"replaceByName": "Replace existing photos with same name",
|
||||
"uploadPhotos": "Upload Photos",
|
||||
"uploadMedia": "Upload Photos & Videos",
|
||||
|
||||
Reference in New Issue
Block a user