The discussion revolves around a feature request to preserve original filenames when uploading files to Discourse. sebastianh highlights the inconvenience of files being renamed to hashes (e.g., 07c87843ae28c0b61c8ecf1b153000513b292c47.png) when uploading assets like favicons and logos, which are often named descriptively (e.g., favicon-32.png). gerhard notes this issue has been raised before and proposes storing files in a directory based on their hash while retaining the original filename. omfg agrees, suggesting a subfolder structure (e.g., /uploads/users/user1/favicons/) could help, though acknowledges the complexity of handling duplicate filenames. sebastianh acknowledges the engineering solution (hashing) but emphasizes the need for a user-friendly way to upload logos and favicons as a built-in feature.
I hope I am not bringing something up that’s beaten around too much, but I am just getting started setting up my Discourse and on thing bothered my right off the bat.
Problem: I upload the site’s assets, a bunch of favicons, logos, etc, mostly png files, named for example favicon-32.png, or appletouch-144.png etc, basically filenames that tell me very clearly what they’re supposed to be used for, most simply favicon.ico
Now, I upload it as instructed and they all get turned into something like
/uploads/db2992/original/2X/0/07c87843ae28c0b61c8ecf1b153000513b292c47.png, leaving me to wonder which file was supposed to be which one, the only way around it being to upload them one by one and adding proper description texts in the reply posting.
Idea: Why not keep the original filenames? Turning the entire logo uploading shenanigans into proper file upload dialogs in the admin settings dashboard, where they belong, would be an entirely different, but not alltogether unrelated feature request.
Looking forward to replies, and if despite me looking and not having found it, it has already been discussed, please forgive, merge, and/or delete. Thanks for the help in advance!
It’s not randomized. It’s a hash of the file. So, if you upload the same file more than once it’s only stored once and it always has the filename it had at first upload.
That’s very “engineery”, another reason it would be great to offer the logo, favicon etc upload as a functionality of the admin dashboard, so I don’t have to worry about the (justifiable reasons behind) hashed filenames and all these things