feat(photos): read the EXIF of an uploaded photo

Closes the third source of capture metadata (#1614). Provider photos are asked
for, uploaded files carry their own answer — and until now nobody read it, so
the most common case of all, a photo taken on the trip and uploaded straight
into the journey, could never appear on the map.

exifr rather than a heavier image library: pure JS, no native build, so no
musl-pin dance in the Alpine image. Only four tags are picked, so a large file
is not fully parsed. The resolved path is checked against the uploads root
before it is opened.

One thing worth knowing before someone files a bug about it: the client
converts HEIC before upload and that conversion drops GPS, so an iPhone photo
arrives here already stripped. Nothing to read is the expected outcome more
often than not, which is why the empty case is silent.
This commit is contained in:
Maurice
2026-08-18 20:18:49 +02:00
committed by Maurice
parent 359c3afc21
commit d2cf694882
4 changed files with 52 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@
"cors": "^2.8.5",
"cron": "^4.4.0",
"dotenv": "^16.4.1",
"exifr": "7.1.3",
"express": "^4.18.3",
"fast-xml-parser": "^5.5.10",
"helmet": "^8.1.0",