Pergunta

I've set up a MediaWiki page and now I'm trying to upload files beside images to it.
LocalSettings.php:

$wgEnableUploads = true;
$wgCheckFileExtensions = false;
$wgStrictFileExtensions = false;

I get this error: File extension ".vssettings" does not match the detected MIME type of the file (application/xml).
How can I upload this file anyway? I want users with admin rights to be able to upload any file type.

I found no solution in the documentation.

Foi útil?

Solução

You also need to set $wgVerifyMimeType to false, to bypass the mime type check. As noted in the docs, you do not want to do this on a public wiki.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top