Windows or Firefox changes xmp to xml when downloading

Starting today when I click on an xmp file to download it, the extension gets changed to xml in the download box. I am using Windows 10 and Firefox. Anyone else having this problem?

You are quite right. The link is an xmp but when I save as Firefox wants to save it as xml. Have you tried changing the extension and seeing whether it contains the same contents?

Are dt xmps xml-friendly triggering Firefox’s desire to change it to xml?

I assumed they would work if I changed it back to xmp, but I haven’t tested one yet. I downloaded a bunch yesterday, no problem. Suddenly today, problem.

I don’t like recent Firefox changes. E.g. pop up notice is gone; was useful to detect them and quickly allow them on the individual basis without allowing all. E.g. it keeps on crashing on my phone.

Its annoying, but XMP is XML. Just change the extension.

Super pain in the neck.

You could try adding a MIME entry to Firefox to see if it overrides this behaviour.

First step: learn what a MIME entry is. I’ll work on that.

1 Like

Could it be the upgrade?

Maybe the server is sending the content type as text/xml and Firefox is being too smart.

I mean, in previous version the server maybe didn’t set the “right” content type header.

/cc @darix

https://www.iana.org/assignments/media-types/media-types.xhtml

I found an example:

You can simply create the registry entries for those types for your code to read

in regedit go to HKEY_LOCAL_MACHINE\Software\Classes (the central part of HKCR)
right click Classes, New Key - call it .pdf
right click on the right hand side, New String - "Content Type", "application/pdf"

But I don’t know what I would do to make Firefox recognize the xmp file type and stop changing it. I have a post in the Firefox support community. I think it was the Firefox update that caused this.

I have tested a sidecar that I changed from xml to xmp, and it worked.

I download all the xmps in each Play Raw that I look at and work through all of them. I have a programmable keyboard and have a macro now that once I change the file type to all files, the macro changes the name. So that has made this less annoying.

It takes me a while to jog the noggin. No need to play with the registry.

1 Go to %AppData%\Mozilla\Firefox\Profiles.
2 Choose the profile folder that is currently in use and edit handlers.json.
3 Add xmp like so and remember to save as UTF-8.

        "text/xml": {
            "action": 2,
            "extensions": [
                "xml",
                "xsl",
                "xbl",
                "xmp"
            ],
            "ask": true
        },

4 Restart Firefox.

I finally smartened up and tried downloading with Edge. It kept the file as an xmp, so it is not Windows.

I have tried modifying the file as indicated. It follows a different format, everything in one line. I may not have added the new information properly. What happens is upon restarting Firefox, it marks the file as corrupt and creates a new one. I would upload the file, but pixls will not allow it. This is the tail end of the text with my addition:

“mailto”:{“action”:4,“handlers”:[null,{“name”:“Yahoo! Mail”,“uriTemplate”:“https://compose.mail.yahoo.com/?To=%s"},{“name”:“Gmail”,“uriTemplate”:“https://mail.google.com/mail/?extsrc=mailto&url=%s”}]}}},“text/xml”:{“action”:2,“extensions”:[“xml”,“xsl”,“xbl”,“xmp”],"ask”: true}

This part is essential reading

Perhaps, you also have to be careful about newline carriages and add a empty last line. I suggest using apps like Notepad++, etc.

I “tidied” the json. Plenty of websites can do that for you.

In the meantime, I received a reply on Firefox support that points out an issue with “the server is not sending a Content-Type header with the file…” Perhaps this is something that can be changed, @paperdigits. A Firefox add-on was also offered as a remedy.
https://support.mozilla.org/en-US/questions/1319324

This was never an issue until a couple days ago. Only @afre has responded saying he had the issue until he fixed it apparently. Why just us?

I did that first, and it was rejected. I removed my addition and saved it as a UTF-8, and it was rejected again. I saved it as a text file, and without my addition, and it was accepted. I’ll try Notepad. You said you tidied the json. I don’t understand.

I’ll have to get it first.

First web result for key words “tidy json”: Tidy JSON Online. Try it.

@afre: Tidied, changed with Notepad++, saved as UTF-8. No joy :frowning_face:

   "mailto": {
        "action": 4,
        "handlers": [
            null,
            {
                "name": "Yahoo! Mail",
                "uriTemplate": "https://compose.mail.yahoo.com/?To=%s"
            },
            {
                "name": "Gmail",
                "uriTemplate": "https://mail.google.com/mail/?extsrc=mailto&url=%s"
            }
        ]
    }
},
"text/xml": {
    "action": 2,
    "extensions": [
        "xml",
        "xsl",
        "xbl",
        "xmp"
    ],
    "ask": true
}

}
Never mind. The add-on fixed it.

So Firefox is the culprit. I downloaded CR3 and NEF yesterday. I got MP4 and TIFF. Had to rename them back to CR3 and NEF.

1 Like