Reviews for Double-click Image Downloader
Double-click Image Downloader by Marnes
Review by alphapack
Rated 5 out of 5
by alphapack, 5 years agoWriting this review to give you an idea to fix already known issue (https://addons.mozilla.org/en-US/firefox/addon/double-click-image-download/reviews/1464906/).
SOLUTION: Find a way to check if the filename contains any extension, if it doesn't then try to find the image type (AFAIK a lot of sites can do this already, so there might be a library for that) and then just add it to the filename.
Good luck :)
SOLUTION: Find a way to check if the filename contains any extension, if it doesn't then try to find the image type (AFAIK a lot of sites can do this already, so there might be a library for that) and then just add it to the filename.
Good luck :)
Developer response
posted 5 years agoThanks for the constructive input, but unfortunately filename extensions are not a reliable way to determine file types. They can be missing, simply incorrect (how often I've come across a .jpg that was actually a png and vice versa...), or some website-specific filename thing that happens to have a period in it so it looks like an extension. Browsers can determine the content type themselves by looking at the data, but in HTTP requests the convention is that the server must provide a human-friendly filename with a convenient extension and only the browser can make a last ditch attempt. If a server provides no meaningful name for a file triggered by this addon, then there's nothing it can do to help the situation, it's the least qualified party involved.