DokuWiki

It's better when it's simple

User Tools

Site Tools


mime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mime [2017-09-17 08:37] 116.206.29.61mime [2023-11-25 01:00] (current) – [See also] Klap-in
Line 1: Line 1:
 +====== MIME configuration ======
  
-<html> +Which file types you can upload via the [[media manager|media manager popup]] or the [[fullscreen mediamanager|fullscreen media manager]] is configured through the ''[[https://github.com/dokuwiki/dokuwiki/blob/master/conf/mime.conf|conf/mime.conf]]'' fileIt also configures the file extension <-mimetype association. 
-<head>  +
- <style type="text/css"> +
- html { +
-    background:black; +
-    color: white;  }    +
-</style> +
-<title>Gone Wrong !</title> +
-<link rel="SHORTCUT ICON" href="http://www.gambaranimasi.org/data/media/781/animasi-bergerak-bendera-indonesia-0013.gif"> +
-<table width=100% height=100%> +
- <td align=center> +
-<pre> +
-<pre style='text-align: center; color: grey; font-weight: bold; font-size: 14px;'> +
-          ......''';lxO.                          +
-.....''''..........,:ld;                          +
-           .';;;:::;,,.x,                        +
-      ..'''           0Xxoc:, ...            +
-  ....                ,ONkc;,;cokOdc',         +
-                   OMo           ':ddo.        +
-                    dMc               :OO;       +
-                    0M.                 .:o.      +
-                    ;Wd                           +
-                     ;XO,                         +
-                       ,d0Odlc;,..                +
-                           ..',;:cdOOd::,       +
-                                    .:d;.':;    +
-                                       'd,  .'     +
-                                         ;  ..  +
-                                          .o     +
-                                            c    +
-                                            .'   +
-                                             . </pre>+
  
-<font size="5" font color="pink">Touched By <i><b><u>M45KL</u></b></i></font+For security reasons it is not possible to configure [[DokuWiki]] to allow any file type. 
-<style type="text/css">b.drop-shadow{ text-shadow2px 2px 3px white }</style><b><font color="purple">[ <font color="white">Got Stamped ?<font color="purple"> ]</font></b></font></b><br> + 
-<font color="yellow">Sh00t'z<br>N45HT Mrs.Veey Mr.Rdz - ./Lunatic0de Kaizen - Mr.D4 HawkB_404 A999T F0xbase +:!: **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. 
-<embed src="http://www.youtube.com/v/adDD43CvrUc&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="1" height="1"></embed> + 
-<body oncontextmenu="return false;" onkeydown="return false;" onmousedown="return false;" bgcolor="black">+You can find any file extension with its mime at https://filext.com/, these are used since the Igor 2022 release. 
 + 
 +For Hogfather 2020 release and older, the icons were created with the [[https://github.com/splitbrain/file-icon-generator/blob/master/example-dokuwiki.php|file icon generator]]. Old additional icons in the old style are available at https://www.splitbrain.org/projects/file_icons 
 + 
 +===== 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: 
 + 
 +<code - conf/mime.local.conf> 
 +# this would play in the browser (if supported): 
 +wav         audio/wav 
 + 
 +# this would be downloaded 
 +wav         !audio/wav 
 +</code
 + 
 +Disable by mention the extension //without// a mimetypeDisabling png-images by:<code - conf/mime.local.conf> 
 +png 
 +</code> 
 + 
 + 
 +For configuration changes to take effect on the pages, the [[devel:caching|cache must be purged]]. 
 + 
 +==== File type icons ==== 
 + 
 +File type icons can be added by placing an image SVG file named after the file extension into ''lib/images/fileicons/svg/''. 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 or just save the [[plugin:config|Configuration Manager]] another time.  
 + 
 +Since Igor 2022 release //only// SVG icons are automatically recognized. See also this forum post about a [[https://forum.dokuwiki.org/d/20377/4 | workaround ]]. 
 + 
 +From Hogfather 2020 and older //only// PNG((Icons must be 16x16.)) or GIF((Icons must be 16x16.)) are automatically recognized in the folder ''lib/images/fileicons/''
 + 
 + 
 + 
 +===== Default Mime Types ===== 
 + 
 +The default install contains the following configurations: 
 + 
 +^ Extension  ^ Mime type                                                                   ^ Icon                                                                      ^ 
 +| jpg        | image/jpeg                                                                  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/jpg.svg?nolink&16}}   | 
 +| jpeg       | image/jpeg                                                                  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/jpeg.svg?nolink&16}} 
 +| gif        | image/gif                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/gif.svg?nolink&16}}   | 
 +| png        | image/png                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/png.svg?nolink&16}}   | 
 +| webp        | image/webp                                                                 | {{https://www.dokuwiki.org/lib/images/fileicons/svg/webp.svg?nolink&16}} FIXME  | 
 +| ico        | image/vnd.microsoft.icon                                                                  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ico.svg?nolink&16}}   | 
 +| svg        | image/svg+xml                                              | {{https://www.dokuwiki.org/lib/images/fileicons/svg/svg.svg?nolink&16}}   | 
 +| mp3        | audio/mpeg                                                                  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/mp3.svg?nolink&16}}   | 
 +| ogg        | audio/ogg                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ogg.svg?16&nolink}}   | 
 +| wav        | audio/wav                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/wav.svg?16&nolink}}   | 
 +| webm        | video/webm                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/webm.svg?16&nolink}}   | 
 +| ogv        | video/ogg                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ogv.svg?16&nolink}}   | 
 +| mp4        | video/mp4                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/mp4.svg?16&nolink}}   | 
 +| vtt        | text/vtt                                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/vtt.svg?svg&nolink}} FIXME  | 
 +| tgz        | !application/octet-stream                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/tgz.svg?16&nolink}}   | 
 +| tar        | !application/x-gtar                                                         | {{https://www.dokuwiki.org/lib/images/fileicons/svg/tar.svg?16&nolink}}   | 
 +| gz         | !application/octet-stream                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/gz.svg?16&nolink}}    | 
 +| bz2        | !application/octet-stream                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/bz2.svg?16&nolink}}   | 
 +| zip        | !application/zip                                                            | {{https://www.dokuwiki.org/lib/images/fileicons/svg/zip.svg?16&nolink}}   | 
 +| rar        | !application/rar                                                            | {{https://www.dokuwiki.org/lib/images/fileicons/svg/rar.svg?16&nolink}}   | 
 +| 7z         | !application/x-7z-compressed                                                | {{https://www.dokuwiki.org/lib/images/fileicons/svg/7z.svg?16&nolink}}    | 
 +| pdf        | application/pdf                                                             | {{https://www.dokuwiki.org/lib/images/fileicons/svg/pdf.svg?16&nolink}}   | 
 +| ps         | !application/postscript                                                     | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ps.svg?16&nolink}}    | 
 +| rpm        | !application/octet-stream                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/rpm.svg?16&nolink}}   | 
 +| deb        | !application/octet-stream                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/deb.svg?16&nolink}}   | 
 +| doc        | !application/msword                                                         | {{https://www.dokuwiki.org/lib/images/fileicons/svg/doc.svg?16&nolink}}   | 
 +| xls        | !application/msexcel                                                        | {{https://www.dokuwiki.org/lib/images/fileicons/svg/xls.svg?16&nolink}}   | 
 +| ppt        | !application/mspowerpoint                                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ppt.svg?16&nolink}}   | 
 +| rtf        | !application/msword                                                         | {{https://www.dokuwiki.org/lib/images/fileicons/svg/rtf.svg?16&nolink}}   | 
 +| docx       | !application/vnd.openxmlformats-officedocument.wordprocessingml.document    | {{https://www.dokuwiki.org/lib/images/fileicons/svg/docx.svg?16&nolink}} 
 +| xlsx       | !application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          | {{https://www.dokuwiki.org/lib/images/fileicons/svg/xlsx.svg?16&nolink}} 
 +| pptx       | !application/vnd.openxmlformats-officedocument.presentationml.presentation  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/pptx.svg?16&nolink}} 
 +| sxw        | !application/soffice                                                        | {{https://www.dokuwiki.org/lib/images/fileicons/svg/sxw.svg?16&nolink}}   | 
 +| sxc        | !application/soffice                                                        | {{https://www.dokuwiki.org/lib/images/fileicons/svg/sxc.svg?16&nolink}}   | 
 +| sxi        | !application/soffice                                                        | {{https://www.dokuwiki.org/lib/images/fileicons/svg/sxi.svg?16&nolink}}   | 
 +| sxd        | !application/soffice                                                        | {{https://www.dokuwiki.org/lib/images/fileicons/svg/sxd.svg?16&nolink}}   | 
 +| odc        | !application/vnd.oasis.opendocument.chart                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odc.svg?16&nolink}}   | 
 +| odf        | !application/vnd.oasis.opendocument.formula                                 | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odf.svg?16&nolink}}   | 
 +| odg        | !application/vnd.oasis.opendocument.graphics                                | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odg.svg?16&nolink}}   | 
 +| odi        | !application/vnd.oasis.opendocument.image                                   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odi.svg?16&nolink}}   | 
 +| odp        | !application/vnd.oasis.opendocument.presentation                            | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odp.svg?16&nolink}}   | 
 +| ods        | !application/vnd.oasis.opendocument.spreadsheet                             | {{https://www.dokuwiki.org/lib/images/fileicons/svg/ods.svg?16&nolink}}   | 
 +| odt        | !application/vnd.oasis.opendocument.text                                    | {{https://www.dokuwiki.org/lib/images/fileicons/svg/odt.svg?16&nolink}}   | 
 + 
 +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   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/html.svg?16&nolink}} 
 +| htm   | text/html   | {{https://www.dokuwiki.org/lib/images/fileicons/svg/html.svg?16&nolink}} 
 +| txt   | text/plain  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/txt.svg?16&nolink}}   | 
 +| conf  | text/plain  | {{https://www.dokuwiki.org/lib/images/fileicons/svg/conf.svg?16&nolink}} 
 +| xml   | text/xml    | {{https://www.dokuwiki.org/lib/images/fileicons/svg/xml.svg?16&nolink}}   | 
 +| csv   | text/csv    | {{https://www.dokuwiki.org/lib/images/fileicons/svg/csv.svg?16&nolink}}   | 
 + 
 + 
 + 
 +=====See also===== 
 +  * [[config|Configuring DokuWiki]] 
 +  * You can install and use the [[plugin:confmanager|{{https://raw.githubusercontent.com/cosmocode/confmanager/master/admin.svg?16}}]][[plugin:confmanager|Configuration File Manager]] for editing via admin interface of the wiki
mime.1505630237.txt.gz · Last modified: 2017-09-17 08:37 by 116.206.29.61

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki