====== MIME configuration ====== 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. :!: **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 [[config: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 You can find any file extension with it's mime at http://filext.com/ ===== Adding additional Mime Types ===== Additional mimetypes should be added in ''mime.local.conf'' (you need to create this file). The file expects an extension (without the dot) and a mime type. Prefixing the mime type with an exclamation mark (!) will force the browser to present a download dialog, even if a browser plugin for the file in question exists. Example: # this would play in the browser (if supported): wav audio/wav # this would be downloaded wav !audio/wav File type icons can be added by placing an image file (PNG or GIF)((Icons must be 16x16.)) named after the file extension into ''lib/images/fileicons/''. Note: because the stylesheet used for assigning the fileicons gets [[caching|cached]] you need to force a rebuild by touching one of the config files. ===== Default Mime Types ===== The default install contains the following configurations: ^Extension^Mime type ^ Icon ^ |jpg |image/jpeg | {{http://www.dokuwiki.org/lib/images/fileicons/jpg.png?nolink&nocache}} | |jpeg |image/jpeg | {{http://www.dokuwiki.org/lib/images/fileicons/jpeg.png?nolink&nocache}} | |gif |image/gif | {{http://www.dokuwiki.org/lib/images/fileicons/gif.png?nolink&nocache}} | |png |image/png | {{http://www.dokuwiki.org/lib/images/fileicons/png.png?nolink&nocache}} | |swf |application/x-shockwave-flash| {{http://www.dokuwiki.org/lib/images/fileicons/swf.png?nolink&nocache}} | |mp3 |audio/mpeg | {{http://www.dokuwiki.org/lib/images/fileicons/mp3.png?nolink&nocache}} | |ogg |audio/ogg | {{http://www.dokuwiki.org/lib/images/fileicons/ogg.png?nolink&nocache}} | |wav |audio/wav | {{http://www.dokuwiki.org/lib/images/fileicons/wav.png?nolink&nocache}} | |tgz |!application/octet-stream | {{http://www.dokuwiki.org/lib/images/fileicons/tgz.png?nolink&nocache}} | |tar |!application/x-gtar | {{http://www.dokuwiki.org/lib/images/fileicons/tar.png?nolink&nocache}} | |gz |!application/octet-stream | {{http://www.dokuwiki.org/lib/images/fileicons/gz.png?nolink&nocache}} | |bz2 |!application/octet-stream | {{http://www.dokuwiki.org/lib/images/fileicons/bz2.png?nolink&nocache}} | |zip |!application/zip | {{http://www.dokuwiki.org/lib/images/fileicons/zip.png?nolink&nocache}} | |rar |!application/rar | {{http://www.dokuwiki.org/lib/images/fileicons/rar.png?nolink&nocache}} | |7z |!application/x-7z-compressed | {{http://www.dokuwiki.org/lib/images/fileicons/7z.png?nolink&nocache}} | |pdf |application/pdf | {{http://www.dokuwiki.org/lib/images/fileicons/pdf.png?nolink&nocache}} | |ps |!application/postscript | {{http://www.dokuwiki.org/lib/images/fileicons/ps.png?nolink&nocache}} | |rpm |!application/octet-stream | {{http://www.dokuwiki.org/lib/images/fileicons/rpm.png?nolink&nocache}} | |deb |!application/octet-stream | {{http://www.dokuwiki.org/lib/images/fileicons/deb.png?nolink&nocache}} | |doc |!application/msword | {{http://www.dokuwiki.org/lib/images/fileicons/doc.png?nolink&nocache}} | |xls |!application/msexcel | {{http://www.dokuwiki.org/lib/images/fileicons/xls.png?nolink&nocache}} | |ppt |!application/mspowerpoint | {{http://www.dokuwiki.org/lib/images/fileicons/ppt.png?nolink&nocache}} | |rtf |!application/msword | {{http://www.dokuwiki.org/lib/images/fileicons/rtf.png?nolink&nocache}} | |docx |!application/vnd.openxmlformats-officedocument.wordprocessingml.document | {{http://www.dokuwiki.org/lib/images/fileicons/docx.png?nolink&nocache}} | |xlsx |!application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | {{http://www.dokuwiki.org/lib/images/fileicons/xlsx.png?nolink&nocache}} | |pptx |!application/vnd.openxmlformats-officedocument.presentationml.presentation | {{http://www.dokuwiki.org/lib/images/fileicons/pptx.png?nolink&nocache}} | |sxw |!application/soffice | {{http://www.dokuwiki.org/lib/images/fileicons/sxw.png?nolink&nocache}} | |sxc |!application/soffice | {{http://www.dokuwiki.org/lib/images/fileicons/sxc.png?nolink&nocache}} | |sxi |!application/soffice | {{http://www.dokuwiki.org/lib/images/fileicons/sxi.png?nolink&nocache}} | |sxd |!application/soffice | {{http://www.dokuwiki.org/lib/images/fileicons/sxd.png?nolink&nocache}} | |odc |!application/vnd.oasis.opendocument.chart | {{http://www.dokuwiki.org/lib/images/fileicons/odc.png?nolink&nocache}} | |odf |!application/vnd.oasis.opendocument.formula | {{http://www.dokuwiki.org/lib/images/fileicons/odf.png?nolink&nocache}} | |odg |!application/vnd.oasis.opendocument.graphics | {{http://www.dokuwiki.org/lib/images/fileicons/odg.png?nolink&nocache}} | |odi |!application/vnd.oasis.opendocument.image | {{http://www.dokuwiki.org/lib/images/fileicons/odi.png?nolink&nocache}} | |odp |!application/vnd.oasis.opendocument.presentation| {{http://www.dokuwiki.org/lib/images/fileicons/odp.png?nolink&nocache}}| |ods |!application/vnd.oasis.opendocument.spreadsheet | {{http://www.dokuwiki.org/lib/images/fileicons/ods.png?nolink&nocache}}| |odt |!application/vnd.oasis.opendocument.text | {{http://www.dokuwiki.org/lib/images/fileicons/odt.png?nolink&nocache}} | 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 | {{http://www.dokuwiki.org/lib/images/fileicons/html.png?nolink&nocache}} | |htm |text/html | {{http://www.dokuwiki.org/lib/images/fileicons/html.png?nolink&nocache}} | |txt |text/plain | {{http://www.dokuwiki.org/lib/images/fileicons/txt.png?nolink&nocache}} | |conf |text/plain | {{http://www.dokuwiki.org/lib/images/fileicons/conf.png?nolink&nocache}} | |xml |text/xml | {{http://www.dokuwiki.org/lib/images/fileicons/xml.png?nolink&nocache}} | |csv |text/csv | {{http://www.dokuwiki.org/lib/images/fileicons/csv.png?nolink&nocache}} |