WFDASHDRIVER-APP/lib
Dave efba1bbf2f fix(photos): downscale pickup photos client-side before upload
Every pickup-photo upload on 2026-10-12 failed: 86 of 86 attempts
came back `400 unexpected EOF`, median 7.6s, max 15.6s. The old
comment here blamed a PocketBase `image/*` mime-detection bug, which
was wrong on both counts — `order_item_attachements` has
mimeTypes=null, so nothing was checking the format. Go's multipart
parser was hitting end-of-body before the declared Content-Length
arrived: a 3-8MB Android camera file truncated in transit on mobile
data.

The office side never hit this because WFDASH re-encodes to
1200px/q70 in attachment-compressor.ts before storing. This adds the
same treatment on the driver side so both produce comparable images
(~150-300KB, sub-second transfer).

compressPhoto() never throws and never returns null — on any decode
failure it hands back the original file. Compression here is an
optimisation, not a correctness requirement, so it must never turn a
photo that might have uploaded fine into a hard error.
2026-10-14 16:12:37 +02:00
..
hooks.ts feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
image.ts fix(photos): downscale pickup photos client-side before upload 2026-10-14 16:12:37 +02:00
itemsCache.ts feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
pocketbase.ts fix(photos): downscale pickup photos client-side before upload 2026-10-14 16:12:37 +02:00
pwa.ts Add PWA support and UI redesign 2026-05-27 00:34:50 +02:00
theme.ts feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
types.ts feat(pocketbase): merge stock_purchase_items into Assigned list 2026-08-17 22:33:10 +02:00
utils.ts feat(grouping): add area grouping, refine UI and cleanup 2026-07-10 02:01:57 +02:00