From 760bcadc09a874072379712fd6b60f599b3f46e4 Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 21 May 2026 22:37:55 -0400 Subject: [PATCH] T5: DNG/RAW-02 photo upload support --- Home.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Home.md b/Home.md index 34f6831..7e46766 100644 --- a/Home.md +++ b/Home.md @@ -31,6 +31,14 @@ Mobile-first web app for tracking physical assets via barcode scanning, OCR stic - **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 DNG/RAW-02 Photo Upload Support — May 2026 +- **Added `.dng`** to `PHOTO_ALLOWED_EXTS` — Pixel 9a RAW-02 DNG photos now accepted +- **Bumped `PHOTO_MAX_SIZE`** from 10MB to 20MB — RAW-02 DNG files are ~13MB +- **All upload paths covered:** `/api/upload/photo`, `/api/ocr`, `/api/connect-label` +- **No EXIF handling changes needed:** `write_bytes()` preserves DNG EXIF naturally; `_re_embed_exif()` correctly skips non-JPEG; `_extract_gps_from_bytes()` opens DNG as TIFF via PIL (already works) +- **Verified:** Synthetic DNG upload via `/api/upload/photo` succeeded, file saved byte-identical. OCR endpoint also accepts `.dng`. +- Commit: 497d110 + ### 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.