fix: photo upload issues with file limit and date formatting

- Add 20-file limit validation to PhotoUpload component
- Prevent Multer "Unexpected field" errors by enforcing client-side limit
- Fix JSON parsing error in dateFormatter when value is already an object
- Add missing translation keys for upload error messages
- Handle both string and object values for date format settings

These fixes resolve the 400 error when uploading more than 20 files
and the "Unexpected token o in JSON" error during email queue creation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-14 20:55:06 +02:00
parent 4bcca58a11
commit 0fb17c78fa
7 changed files with 39 additions and 2 deletions
+4 -1
View File
@@ -47,7 +47,10 @@
"uploadComplete": "Upload complete!",
"uploadFailed": "Upload failed",
"someFilesFailed": "Some files failed to upload",
"uploadPhotos": "Upload Photos"
"uploadPhotos": "Upload Photos",
"maxFilesReached": "Maximum 20 files allowed",
"someFilesSkipped": "Some files were skipped (20 file limit)",
"tooManyFiles": "Maximum 20 files can be uploaded at once"
},
"navigation": {
"dashboard": "Dashboard",