Hello all,
I desesperately need help and some one of you may give me a few TIPS ...
I try to enable "file upload" in my wiki (for images but also other files type)
I changed the default settings to enable various file extensions. The problem is : whatever i try to upload i have an error message
I tried JPG, PDF or some other things ` Ce fichier est corrompu, a une taille nulle ou possède une extension invalide. Veuillez vérifer le fichier.
Something like : The file is corrupt or has an incorrect extension. Please check the file and upload again.
If i try GIF i have : The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file.
Basically, my problem may be : i have nothing in the local settings (i don't know why) about file upload, so i modified the default settings(and this may be wrong)
thanks for your feedback. I'd like also what is the rule to follow when you want to modify any of the default settings and this settings is not in the local settings ?
Thnaks for your help
Here is what i did in my default settings :
/** * This is the list of preferred extensions for uploading files. Uploading files * with extensions not in this list will trigger a warning. */ $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg','pdf','doc','ppt','xls','psd','sxi','sxg','svw','sxc','ai' );
/** Files with these extensions will never be allowed as uploads. */ $wgFileBlacklist = array( # HTML may contain cookie-stealing JavaScript and web bugs 'html', 'htm', 'js', 'jsb', # PHP scripts may execute arbitrary code on the server 'php', 'phtml', 'php3', 'php4', 'phps', # Other types that may be interpreted by some servers 'shtml', 'jhtml', 'pl', 'py', 'cgi', # May contain harmful executables for Windows victims 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ); /** Files with these mime types will never be allowed as uploads * if $wgVerifyMimeType is enabled. */ $wgMimeTypeBlacklist= array( # HTML may contain cookie-stealing JavaScript and web bugs 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript', # PHP scripts may execute arbitrary code on the server 'application/x-php', 'text/x-php', # Other types that may be interpreted by some servers 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh' );
/** This is a flag to determine whether or not to check file extensions on upload. */ $wgCheckFileExtensions = true;
/** * If this is turned off, users may override the warning for files not covered * by $wgFileExtensions. */ $wgStrictFileExtensions = true;