[pmwiki-users] upload extensions

Patrick R. Michaud pmichaud at pobox.com
Fri Jul 8 11:38:29 CDT 2005


On Fri, Jul 08, 2005 at 06:09:34PM +0200, Thomas N. Burg wrote:
> I have problems with the upload of specific extensions. Although I  
> have listed the dxf-extensions I can't upload it.
> The error message is "'dxf' is not an allowed file extension"
> Here is the relevant part of my config.php
> $UploadExts = array 
> ('gif','jpeg','jpg','png','xls','doc','ppt','tiff','pdf', 'txt',  
> 'plt', '2D', 'dxf');

Each entry in $UploadExts needs to be the extension and the
mime-type associated with that extension, thus:

   $UploadExts = array(
     'gif' => 'image/gif',
     'jpeg' => 'image/jpeg',
     'jpg' => 'image/jpeg',
     'png' => 'image/png',
     # ...
   )

For the types that PmWiki already knows about it's not necessary
to repeat them here (the upload.php script adds PmWiki's defaults
to whatever the admin supplies).  If you're wanting to turn off
specific types from PmWiki's defaults, let me know and I'll 
describe ways to do that.

Pm



More information about the pmwiki-users mailing list