From 435868f2403730bcdfeca01c2e26e32f46f8b31a Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 21 May 2026 22:23:21 -0400 Subject: [PATCH] =?UTF-8?q?T2:=20EXIF=20preservation=20fix=20=E2=80=94=20c?= =?UTF-8?q?reateAssetFromPicked()=20now=20passes=20original=20File?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Home.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Home.md b/Home.md index 8342520..34f6831 100644 --- a/Home.md +++ b/Home.md @@ -24,6 +24,13 @@ Mobile-first web app for tracking physical assets via barcode scanning, OCR stic - Server: `ConnectLabelRequest` Pydantic model, `connect_label()` async endpoint - Commit: 6229966 +### T2 EXIF Preservation Fix (createAssetFromPicked) — May 2026 +- **Bug**: `createAssetFromPicked()` used `readAsDataURL -> atob -> Blob` conversion which stripped all EXIF metadata. The manual form received an empty photo — user had to re-select. +- **Fix** (commit eaa2dab): Pass the original `pickedPhotoFile` directly — sets `manualPhotoFile` and `manualPhotoBlob` from the original File object (preserves EXIF). Uses FileReader only for preview display. +- **GPS extraction**: Calls `extractGpsFromPhoto(pickedPhotoFile)` to extract EXIF GPS coordinates and auto-fills `parking_location` + map link in manual form. +- **End-to-end**: `submitManualAsset` already reads `manualPhotoFile` with `exifr.parse()` before upload — the original File now flows through naturally, so EXIF round-trips correctly. +- **Gitea issue**: #33 — created and closed + ### T5 Offline Queue + Background Sync — May 2026 - **Service Worker** (`static/sw.js`): Caches app shell (index.html) + CDN deps (Leaflet, ZXing) on install. Network-first with cache fallback for API GET calls — offline reads still work from cache. POST/PUT/DELETE pass through to the main thread. Cache version: `canteen-v2`. - **IndexedDB offline queue** (`CanteenOfflineDB`): `queueOfflineCreate(assetPayload, photoBlob)` stores asset creation payloads with GPS data and photo blobs. Queue items tracked with status: pending/syncing/done/failed. Retry limit of 5.