I have the following problem, I want to create a HTML input field, where a user can upload a .p7m file and if he clicks on it, he should only see files of that type, but it does not work properly. To change the displayed files, I usually change the "accept" attribute as seen in the example below.
<input class="uploadFile" name="file" type="file" id="file" placeholder="Your P7M..." accept="application/pkcs7-mime" >
What bothers me, is that I don't get the correct files shown for the values I choose in Firefox 60.4.0esr (64-Bit) on Windows 10:
Google Chrome shows .p7m files as well on the same machine.
Browsers use a combination of their own data and the OS data for MIME type <-> file extension mapping.
Chrome apparently has hardcoded mappings for "application/pkcs7-mime", which are used when the OS doesn't provide info on the MIME type.
Firefox does not, so I think in your case it shows the extensions configured in the OS. (If anyone's curious, here's the entry point, the hardcoded values and the code that queries the OS on Windows.) Check what's in HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pkcs7-mime
on your system.
I don't think you can control this from a web page.