feat: enhance photo upload and management features
Deploy Development / deploy (push) Successful in 1m4s
Build Test / pytest-backend (push) Successful in 5s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 17s

- Added `taken_at` timestamp to the photos table for improved photo metadata.
- Updated the photo upload API to support optional EXIF data extraction and file last modified timestamp.
- Enhanced the photo upload process to allow skipping EXIF data, defaulting to today's date if no other date is provided.
- Improved the photo display in various components to utilize a unified caption format.
- Refactored photo sorting and grouping logic for better organization in the UI.
This commit is contained in:
Lars committed 2026-04-19 10:13:22 +02:00
1 parent c91317df8e
commit 0035d08149
12 files changed
+225 -36

No files matched your search

+6 -2
View File
@@ -170,11 +170,15 @@ export const api = {
const d=await r.json();if(!r.ok)throw new Error(formatFastApiDetail(d.detail, JSON.stringify(d)));return d
},
// Photos
uploadPhoto: async (file, date = '') => {
// Photos: EXIF → File.lastModified → date-Feld → heute; skipExif nur Formular/heute
uploadPhoto: async (file, date = '', opts = {}) => {
const fd = new FormData()
fd.append('file', file)
fd.append('date', date)
if (opts.skipExif) fd.append('skip_exif', '1')
if (file && typeof file.lastModified === 'number' && !Number.isNaN(file.lastModified) && file.lastModified > 0) {
fd.append('file_last_modified', String(file.lastModified))
}
const r = await fetch(`${BASE}/photos`, { method: 'POST', body: fd, headers: hdrs() })
const d = await r.json().catch(() => ({}))
if (!r.ok) throw new Error(formatFastApiDetail(d.detail, JSON.stringify(d)))