Saving images in Firefox sometimes produces ".jpg-large" files which are difficult to work with
Categories
(Firefox :: File Handling, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: djvj, Assigned: mak)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(1 file)
This is a copy-paste of a reddit comment I read on a thread about Firefox.
The only issue I have with Firefox is every time I try to save a picture it saves it as a JPG Large for whatever reason and those don't send well over Messengers or Discord. It's annoying enough that I use lightshot to screencap pictures instead of trying to save them.
This seems to be an issue with saving image files from websites (e.g. twitter) that use the URL convention "https://.../foo.jpg:large" (or :orig, etc.) to indicate variant encodings of the same source image.
Reporter | ||
Comment 1•5 years ago
|
||
Follow-up comment on the same thread:
Well I used chrome for years and never had an issue we're trying to save the picture. You know, right click save etc. It just worked. And to the best of my knowledge from what I remember playing around on edge it does the same. For whatever reason it's just Firefox that seems to have that issue for me. I don't know what causes it, and I hate that normal jpg isn't an option whenever I click to save a picture for whatever reason. It's not a deal-breaker because I still use Firefox as my main browser now, it's just super annoying having to use a program on the side for something that I've never had an issue with before.
Comment 2•5 years ago
|
||
I can't reproduce, unfortunately. More detailed steps would really help - even a twitter link where this happens? I tried to find the reddit page based on the quotes but was unsuccessful.
Comment 3•5 years ago
|
||
Hm, looks like some google chrome (...) support link has https://pbs.twimg.com/media/BME07E4CAAA4jqU.jpg:large with the same issue reported.
When saving that link using right click + save link as, I can reproduce, but if I actually open the link and then use cmd+s, macOS suffixes '.jpg' based on the filetype. Still not entirely sure why it's not working...
Comment 4•5 years ago
|
||
So the issue is that https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/uriloader/exthandler/nsExternalHelperAppService.cpp#685-728 gets a suggested file name out of the URL which includes jpg:large
. We then get the primary extension in https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/uriloader/exthandler/nsExternalHelperAppService.cpp#783-787 as the suggested extension, but do not replace the extension for the filename . Some options:
- replace the extension if it contains illegal characters
- replace the extension if a mime info for the content type does not include the extension in question (on Windows we can also check in the registry if we know the extension). We should be cautious about always overwriting
.jpeg
with.jpg
for instance. - replace the extension if it mismatches iff the extension/filename didn't come from a content-disposition header (ie was parsed out of the URL).
Marco said he was interested in looking at this. :-)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/45f786f133e9 Change file extensions with invalid characters to valid file extensions on save. r=Gijs
Comment 7•4 years ago
|
||
bugherder |
Description
•