T2: Fix createAssetFromPicked() to pass original File (preserve EXIF) #33

Closed
opened 2026-05-22 02:20:58 +00:00 by shawn · 0 comments
Owner

Fix: createAssetFromPicked() now passes original File with EXIF

The "Create Asset" button was using readAsDataURL -> atob -> Blob which stripped all EXIF metadata. The manual form received an empty photo.

Changes

  • manualPhotoFile = pickedPhotoFile directly (preserves EXIF)
  • manualPhotoBlob = pickedPhotoFile (preserves EXIF)
  • FileReader used only for preview display
  • Added EXIF GPS extraction via extractGpsFromPhoto()
  • GPS coordinates auto-filled into manual form (parking + map link)

Commit

eaa2dab - fix: createAssetFromPicked() now passes original File with EXIF

The original File now flows through to submitManualAsset where exifr.parse() re-embeds EXIF on the server.

## Fix: createAssetFromPicked() now passes original File with EXIF The "Create Asset" button was using `readAsDataURL -> atob -> Blob` which stripped all EXIF metadata. The manual form received an empty photo. ### Changes - `manualPhotoFile = pickedPhotoFile` directly (preserves EXIF) - `manualPhotoBlob = pickedPhotoFile` (preserves EXIF) - FileReader used only for preview display - Added EXIF GPS extraction via `extractGpsFromPhoto()` - GPS coordinates auto-filled into manual form (parking + map link) ### Commit `eaa2dab` - fix: createAssetFromPicked() now passes original File with EXIF The original File now flows through to `submitManualAsset` where `exifr.parse()` re-embeds EXIF on the server.
shawn closed this issue 2026-05-22 02:20:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#33