KamoCRM

An attachment whose bytes were already stored keeps the extension they were stored under

FixMediaService
Shipped
October 14, 2026 at 5:19 AM UTC
Author
Kamo
Commit
299a911

The content-addressed key is <imgDatId>.<ext>, and every reader builds it from the attaching Img's own fileExt. Dedup matches on the bytes, so the same screenshot re-sent as .jpg after a .png matched the existing dat, stored nothing, and recorded "jpg" — a key naming an object that was never written, so the attachment answered 410 to everyone (BUG-1200096283021632186). The first Img on a dat is the one whose upload wrote the object; a new attachment of stored content now takes its ext. The file name the member sees is unchanged.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing