Double-click Image Downloader 的评价
Double-click Image Downloader 作者: Marnes
alphapack 的评价
评分 5 / 5
来自 alphapack,5 年前Writing 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 :)
开发者回应
发布于 5 年前Thanks 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.