Scale the GitLab commit timeout to the size of a media upload
internal/gitlab.commitTimeout is a flat 15 * time.Second (internal/gitlab/gitlab.go:29) and is applied to every commit the service makes, whether that is a note of a few hundred bytes or a media upload.
A media upload can be up to MEDIA_MAX_BYTES, which defaults to 20 MiB, and is base64-encoded into the Commits API payload — so roughly 27 MB on the wire (internal/repo/gitlab/media.go:53). On a poor connection, 15s is plausible to run out before GitLab has finished accepting it, failing an upload that was otherwise fine.
The usage pattern this hurts is exactly the one the README calls out: posting a photo from a phone, on mobile signal.
Suggested fix: give the binary-file path a longer deadline than the post path — still comfortably inside the server's 30s WriteTimeout (cmd/web/main.go), or raise that alongside it if the numbers do not fit. Scaling with the payload size rather than picking a second constant would be better still.
Worth doing at the same time: the whole-request budget wants stating somewhere, since MEDIA_MAX_BYTES, commitTimeout and WriteTimeout have to be consistent with each other and nothing currently says so. Raising MEDIA_MAX_BYTES today silently makes a timeout more likely rather than allowing a bigger file.