Which file types you can upload via the mediamanager is configured through the conf/mime.conf file. It also configures the file extension ↔ mimetype association.
For security reasons it is not possible to configure DokuWiki to allow any file type.
File type icons can be added by placing an image file (PNG or GIF) named after the file extension into lib/images/fileicons/. Note: because the stylesheet used for assigning the fileicons gets cached you need to force a rebuild by touching one of the config files.
Never enable HTML upload for unprotected wikis, as this opens Cross Site Scripting vulnerabilities through JavaScript. Only enable this with trusted users. You need to disable the iexssprotect option additionally to adding the HTML mime type in the config file.
Additional icons in a similar style are available at http://www.splitbrain.org/projects/file_icons
The default install contains the following configurations:
| Extension | Mime type | Icon |
|---|---|---|
| jpg | image/jpg | |
| jpeg | image/jpeg | |
| gif | image/gif | |
| png | image/png | |
| tgz | application/octet-stream | |
| tar | application/x-gtar | |
| gz | application/octet-stream | |
| zip | application/zip | |
| application/pdf | |
|
| ps | application/postscript | |
| doc | application/msword | |
| xls | application/msexcel | |
| ppt | application/mspowerpoint | |
| rtf | text/rtf | |
| swf | application/x-shockwave-flash | |
| rpm | application/octet-stream | |
| deb | application/octet-stream | |
| sxw | application/soffice | |
| sxc | application/soffice | |
| sxi | application/soffice | |
| sxd | application/soffice | |
| odc | application/vnd.oasis.opendocument.chart | |
| odf | application/vnd.oasis.opendocument.formula | |
| odg | application/vnd.oasis.opendocument.graphics | |
| odi | application/vnd.oasis.opendocument.image | |
| odp | application/vnd.oasis.opendocument.presentation | |
| ods | application/vnd.oasis.opendocument.spreadsheet | |
| odt | application/vnd.oasis.opendocument.text | |
The following text types are commented by default, because spammers are known to upload spam pages through unprotected Wikis using text type files.
| html | text/html | |
| htm | text/html | |
| conf | text/plain | |
| txt | text/plain | |
| xml | text/xml | |
To add support for mp3 files, create a mime.local.conf file and write
mp3 audio/mpeg
Don`t forget to set the permissions of mime.local.conf to 644. A reference of possible mime-types can be found under http://www.w3schools.com/media/media_mimeref.asp