.jpg extension not recognized
Moderator: trava90
Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: .jpg extension not recognized
Maybe related: https://bugzilla.mozilla.org/show_bug.cgi?id=1690539
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Fanatic
- Posts: 225
- Joined: 2021-02-19, 20:46
-
- Pale Moon guru
- Posts: 35650
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: .jpg extension not recognized
Thanks - yeah not seeing anything there that would in itself lead to this behaviour.
It'll need some digging around in bugzilla to find where this behavior was changed maybe get some help from mozregression. I did find that this getting MIME types from the system isn't very robust and I already just now had to fix an issue in the front-end where it would simply bork, so there's a good chance we're missing some other safeguards in the platform for reading MIME types from the system so it could abort enumeration and simply not fall back to the default list.
Can't really look into that now as I'll be away on a trip for the coming week, but if anyone feels the calling...
It'll need some digging around in bugzilla to find where this behavior was changed maybe get some help from mozregression. I did find that this getting MIME types from the system isn't very robust and I already just now had to fix an issue in the front-end where it would simply bork, so there's a good chance we're missing some other safeguards in the platform for reading MIME types from the system so it could abort enumeration and simply not fall back to the default list.
Can't really look into that now as I'll be away on a trip for the coming week, but if anyone feels the calling...
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Fanatic
- Posts: 225
- Joined: 2021-02-19, 20:46
Re: .jpg extension not recognized
It really is not important, just a little annoyance that would be great if changed.
-
- Board Warrior
- Posts: 1651
- Joined: 2018-06-08, 17:02
Re: .jpg extension not recognized
If what I alluded to viewtopic.php?p=248416#p248416 is correct (& of which I have no idea), imgbox is one site that fails.
Note the use of name="files[]" vs name="files" (again, which I have no idea what it means).
And while we're at it, since it couldn't be said, https://imgur.com/upload, https://postimages.org/, https://imgbb.com/, https://freeimagehosting.net/, https://www.imagevenue.com/, are all fine.
Code: Select all
<div class="boxed-content">
<div>
<span class="btn btn-warning fileinput-button select-files-button-large">
<i class="icon-cloud-upload"></i>
<span>UPLOAD IMAGES</span>
<input id="" name="files[]" accept="image/gif, image/jpeg, image/png" multiple="" type="file">
</span>
</div>
And while we're at it, since it couldn't be said, https://imgur.com/upload, https://postimages.org/, https://imgbb.com/, https://freeimagehosting.net/, https://www.imagevenue.com/, are all fine.
Actually, that might be irrelevant, because even the mdn example fails in that it finds .jpg but NOT .jpeg (in PM, where FF finds both).Note the use of name="files[]" vs name="files" (again, which I have no idea what it means).
-
- Fanatic
- Posts: 170
- Joined: 2019-03-16, 13:26
Re: .jpg extension not recognized
imgbox is a list of MIME types, whereas imgur is a list of extensions, so that explains the difference there (didn't check the other sites). With imgbox on Basilisk/Win10, I see "IrfanView JPG File (*.jpg)"; Firefox shows "JPEG Image (*.jpg;*.jpeg;*.jfif;*.pjpeg;*.pjp)". HKCR has .jfif, .jpe, .jpeg & .jpg defined as "image/jpeg" (I do not have associations for .pjpeg or .pjp); "HKCR\MIME\Database\Content Type\image/jpeg" has ".jpg" as Extension - presumably that is where IrfanView comes from (my association).
-
- Astronaut
- Posts: 660
- Joined: 2014-09-01, 15:11
- Location: Milan Italy
Re: .jpg extension not recognized
I always felt that the mechanism Pale Moon has inherited from Firefox to assocIate a handler to a MIME-type or file extension is poor in terms of editability with respect to a mechanism like good old Unix .mime.types and .mailcap. The snapshot shows a piece of my Preferences->Application as it developed across time though I won't be able to tell how I did it.
I am pretty sure I forced "JPEG image" and also "PNG image" to "Use Palemoon" to prevent attempts prompting odd things (like "Use Skype" ???). I am not sure how I ended up to have four entries for pdf files announced with different MIME types (unfortunately servers aren't always using just one), and why the actions associated to them aren't all the same. Unfortunately I cannot make a snapshot of the opened action menu, but fortunately the one which shows up usually displays a prompt like this
The viewer menu has 2 or 3 options (atril, evince and Acroread), so I am able e.g. to use atril (which is lighter and faster) as viewer, but to turn to Acroread before ticking on Save because it offers a better menu to navigate and place the file where I want (note I run without a DE but with a WM).
You do not have the required permissions to view the files attached to this post.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: .jpg extension not recognized
Is there some way we could just have both .jpg and .jpeg extensions associated with the image/jpeg MIME type if the OS doesn't have anything in the registry to override that association? Like, is there actually any code in our codebase that falls back to only associating the .jpeg extension with image/jpeg if it finds nothing in the registry, or is the entire mechanism completely dependent on what the OS has in the registry with no fallback whatsoever?
Like, overall, I think associating both of those with image/jpeg is a safe assumption... to the point that I don't see it as ridiculous to hard-code that in if needed, but would ideally like to allow the OS to override it in case someone has some obscure program that uses .jpg files as something other than JPEG images.
EDIT: Found this, wondering if it's related?
https://xref.palemoon.org/goanna-centra ... ble.idl#31
I don't think image/jpg is a valid MIME type, right? At least, I've never heard of it before...
But hypothetically, if we're associating .jpg with image/jpg internally, and the website is only looking for image/jpeg, then...
Like, overall, I think associating both of those with image/jpeg is a safe assumption... to the point that I don't see it as ridiculous to hard-code that in if needed, but would ideally like to allow the OS to override it in case someone has some obscure program that uses .jpg files as something other than JPEG images.
EDIT: Found this, wondering if it's related?
https://xref.palemoon.org/goanna-centra ... ble.idl#31
I don't think image/jpg is a valid MIME type, right? At least, I've never heard of it before...
But hypothetically, if we're associating .jpg with image/jpg internally, and the website is only looking for image/jpeg, then...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
- Astronaut
- Posts: 660
- Joined: 2014-09-01, 15:11
- Location: Milan Italy
Re: .jpg extension not recognized
I tried to search for an official list of registered MIME types but found only unofficial ones. Looks like it is image/jpeg.athenian200 wrote: ↑2024-02-09, 20:10I don't think image/jpg is a valid MIME type, right? At least, I've never heard of it before...
Edit: or is this ? https://www.iana.org/assignments/media- ... ypes.xhtml
In the .mailcap vs .mime.types framework, one thing is the association between a MIME type and a handler, and another the association between the MIME type and list of extensions. For instance my mail agent, who honours such files, when viewing an attachment whise announced MIME type does not match the extension, asks for confirmation whether I want to use a viewer chosen by file extension.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)
-
- Contributing developer
- Posts: 1537
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: .jpg extension not recognized
Yeah, that's pretty much how I would have assumed MIME types work. The image/jpeg MIME type would be associated with an application that handles it (like GIMP or MS Paint), and then in turn the .jpg and .jpeg file extensions would be associated with the same image/jpeg MIME type, and thus get handled in the same way. It seems the logical/intuitive way for that to work, right? I mean, we have several "pairs" of extensions with the same problem. There's .htm and .html (which should both be text/html), etc...Lucio Chiappetti wrote: ↑2024-02-09, 21:20In the .mailcap vs .mime.types framework, one thing is the association between a MIME type and a handler, and another the association between the MIME type and list of extensions. For instance my mail agent, who honours such files, when viewing an attachment whise announced MIME type does not match the extension, asks for confirmation whether I want to use a viewer chosen by file extension.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind