The discussion revolves around an issue in Discourse version 3.2.0.beta3-dev where attachments are not renamed as expected after being reuploaded. Tee reports that even after removing a file (1.txt) and reuploading it as 2.txt after the grace period, the attachment retains the original name. The user expected the file to be renamed, but the system serves the old filename. Jagster clarifies that the clean orphan uploads grace period setting only removes files after they are no longer linked, and that Discourse likely uses a hashing mechanism to identify files, meaning renaming without reuploading doesn’t update the link. Tee confirms this behavior, noting that the only way to rename a file is to remove it, wait for it to be deleted, and reupload. Jagster agrees with the observation, suggesting the issue stems from Discourse caching based on file content or hash rather than filename.
But I can confirm this behaviour. Discourse serves old file if it is only renamed (I didn’t bother check if it is really that old file or is it just using old filename with link).
I don’t know anything about code or coding, but Discourse uses somekind hashing I reckon. And as long content doesn’t change name it comes from kind of cache. If you really change that attachement Discourse changes linking too.