Feature request: Keep filenames for uploads


(Sebastian) #1

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!


(Gerhard Schlager) #2

This came up a few times, but I can’t find those topics anymore.

I had an idea for changing this:

Unfortunately symlinks won’t work with Amazon S3 (at least that was the case last time I checked).


(omfg) #3

Scenario A:

  • You upload your favicon.ico
  • I upload my favicon.ico

It’s cheaper and less complicated to upload my file under a random name than delete and overwrite yours.

Or, you upload a file that has a name that’s identical to whatever file is already on the server.
Sooner or later it’d start getting confusing.


(Sebastian) #4

I get that, that’s why one could imagine a subfolder /uploads/users/userxzy/favicon.ico and I am talking about /uploads/admin/favicon.ico etc


(omfg) #5

I know and I agree it’d like the same names would be better, but I’m quite sure they don’t randomize it just to annoy us :slight_smile:


(Gerhard Schlager) #6

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.


(Sebastian) #7

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 :slight_smile: