So we’ve had a couple of internal complaints about the fact that the image download name is the sha1 representation and not the actual name of the image (which is available, because you see it in the lightbox). It seems the “actual” name is stored in the metadata of the image.
Is the team open to a PR that retrieves that name and uses it for the download?
This has been brought up before, as I recall, it is a difficult change. @zogstrip can you comment? But maybe if it is only inserted when you attempt to download, that will be easier.
Looking at the way images are handled here on meta.
Images are served via CDN. There is no way you can change the downloaded file name for downloads without routing it via rails first to change the “content-disposition” header.
On both Firefox and Chromium on Ubuntu Gnome, clicking the download link on the expanded image opens the full-size image in a new tab; it doesn’t open a download dialogue. The only way to download the image is by right-clicking.
No repro on Windows, in Firefox when I click the download link (on expanded lightbox) I get a download dialog with the filename thanks to @zogstrip’s latest change:
@zogstrip, we’ve uncovered that this works correctly for images that get “resized” when uploaded due to their large dimensions, but it doesn’t work for images that are below the dimensions requiring the photo to be resized.
I suspect because it doesn’t use the lightbox for the download. You have to right click to download the image and that is simply downloading the embeded image (which happens for the larger images too).
Yeah, I’m aware of that. I just can’t think of an easier solution. As the only other solution I can think of is changing how images get rendered and that doesn’t seem like a good idea (and let me be honest, I don’t expect you to do that! – and I wouldn’t ask you to).
Granted what I will say, is I think our instance primarily has images that are “near” the resize threshold but don’t quite meet it, so they are still “large” images, just not large enough to be resized.
Okay, consider this in our court then. As I don’t see a lot of people requesting this. Also, I can’t guarantee it will get done (SP gets the final say on what our devs work on … who knows, maybe I’ll try this at some point)
@purldator and @BerryBlue, SP hasn’t done anything with this primarily because it is way low on our list. We’ve been spending time on other things for the time being. I can’t even promise this is a priority for us anymore.
The same issue applies not only for images but for all kind of files to download. I wish I could rename them. Even deleting them and re-uploading them with a new filename won’t work since they will have the same hash, discourse will rename them to the old filename you wanted to get rid of.
Example:
I want consistency in the filenames of the different versions in the firmware archive: