SIGN IN SIGN UP

fix: 413 on photo-heavy posts — upload photos to eBay in small batches before publish

The publish request bundled up to 12 base64 photos (~4-8 MB) into one body,
which Vercel rejects over 4.5 MB with a plain-text 413 — surfaced in the UI
as the misleading 'try sorting fewer photos per batch' message.

Now the client ships photos to a new /api/ebay/upload-photos route in
size-bounded batches (~2.8 MB, max 4 photos each), then publishes with the
returned eBay-hosted URLs — a few KB instead of megabytes. The publish
pipeline accepts imageUrls (validated to eBay Picture Services hosts),
skips the server-side upload when URLs are provided, and the aspect-fill
vision pass reads the hosted URLs via Anthropic URL image blocks, so photo
grounding is unchanged. Partial upload failures surface as post warnings.
The 413 message is now context-aware instead of always suggesting smaller
sort batches.
A
ashnicholes-droid committed
1ecbf096618a908a456ab17b91815962073d11e0
Parent: fcc972f