3.2.0.beta3-dev in docker self host.
Settings: I set
clean orphan uploads grace period hours to 1 hour.
What i want
Rename the attachment after i uploaded.
2.txt is the same file but different file name in below describtions.
- I upload an
1.txt file to a post, saved.
- After 5 minutes, i edit the post and remove
1.txt link, saved.
- I rename
- I reupload
2.txt to the post after
- The attachment still name as
But in this situation,
clean orphan settings works.
- NOT save the post
- After 1 hour, i reupload the
- The new attachment link will be
2.txt when download.
That situation is different thing than
clean orphan uploads.. does, isn’t it?
Perhaps I’m misunderstanding.
As far as I know, the only way to rename the file after uploading is to remove it and wait for Discourse to delete it, and then reupload it.
I followed this guide (
edit the posts to remove the attachment links) to remove the file.
Removing means deleting from harddrive, AFAIK.
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.