问题
How do i add the below new extensions in MediaWiki?
*.xmcd and *.mcd for MathCad source files *.m and *.dat for Matlab source files.
I have already few extensions in LocalSettings.php mentioned below
$wgFileExtensions = array_merge( $wgFileExtensions, array( 'doc','pdf', 'ppt', 'zip', 'svg', 'xls', 'vsd', 'vdx', 'docx', 'xlsx', 'pptx') );
Thanks in advance
Jayaprabu R
回答1:
If I've understood correctly, you simply add extensions as follows:
$wgFileExtensions = array_merge( $wgFileExtensions, array( 'doc','pdf', 'ppt', 'zip', 'svg', 'xls', 'vsd', 'vdx', 'docx', 'xlsx', 'pptx', 'xmcd' , 'mcd' , 'm' , 'dat') );
If this don't work, you must check your upload are enabled in same file (LocalSettings.php):
$wgEnableUploads = true;
Directory "images" must be writable. Finally, you can set the maximun size of upload:
$wgMaxUploadFile = '25MB';
来源:https://stackoverflow.com/questions/8709263/how-to-add-extensions-in-mediawiki