[pmwiki-users] Upload Extension
Jonathan Scott Duff
duff at pobox.com
Fri Mar 31 08:49:40 CST 2006
On Thu, Mar 30, 2006 at 11:48:06PM -0800, Gary Spivey wrote:
> Is there a simple way to turn off the extension checking in the upload
> module? I am tired of having to continually add new extensions and
> simply want it to allow uploads of anything.
I *think* you can override the function that does the checking to have
it always return success.
A quick look at the source code for upload.php from the latest pmwiki
shows this:
SDV($UploadVerifyFunction, 'UploadVerifyBasic');
And the function UploadVerifyBasic seems to return the empty string on
success, so perhaps you just need to add this to your local/config.php
function UploadVerifyGary($page,$file,$path) {
return '';
}
$UploadVerifyFunction = 'UploadVerifyGary';
and it should let you upload anything. Though I imagine that you'll
lose content-type information for file suffixes that aren't in the
$UploadExt array.
BTW, caveat lector ... I've spent no more than 30 seconds looking at
the code, so I'm just guessing that this will work. :-)
-Scott
--
Jonathan Scott Duff
duff at pobox.com
More information about the pmwiki-users
mailing list