Make a failed upload say what happened, and log enough to diagnose it

Fixkamo-internal
Shipped
August 8, 2026 at 3:19 AM UTC
Author
kamo
Commit
2c0ae86

A 2 GiB attachment failed at the end of a four-minute transfer with 'Upload failed: upload failed Internal Server Error' — a doubled prefix wrapped around a message that named nothing. The prefix is gone (the composer's notice already opens with 'Upload failed:'), and MediaService now supplies a real reason. The proxy also logs what it did: bytes actually piped against the length the browser declared, plus elapsed seconds, on both success and failure. Working out where those bytes went the first time meant correlating a Traefik access log against a Tomcat stack trace by timestamp, for a request that only fails after minutes of transfer and cannot be cheaply reproduced. The byte count goes through a Transform rather than a 'data' listener so the pipe keeps its backpressure.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing