Topic on Project:Support desk

Richarddteamaccent (talkcontribs)

MediaWiki 1.29.0

I receive the following error when trying to upload .numbers files (Apple):

File extension ".numbers" does not match the detected MIME type of the file (application/zip).

.Numbers files are not accepted by default, so after doing some research, I did the following:

I added the .numbers file extension to $wgFileExtensions.

I added "application/vnd.apple.numbers" to the mime.types file.

I also added "application/x-iwork-numbers-sffnumbers" to the mime.info file.

Have I missed anything? After making the changes above and trying to upload a .numbers file, I still get a "File extension ".numbers" does not match the detected MIME type of the file (application/zip)" error.

Thank you for your assistance.

Ciencia Al Poder (talkcontribs)

That file type is problematic, because it's really a zip file with .numbers extension. That means, if enabled, that anyone can upload a zip file with that extension, and linux users for example that don't rely on file extensions will download a zip file instead.

If you really want to enable it, knowing the security risks, read Manual:Configuring file uploads#Configuring file types where at near the end of the section explains how to enable that.