To jest stara wersja strony!
Konfiguracja MIME
Które typy plików mogą być przesyłane przy użyciu menadżera multimediów jest ustalane w pliku conf/mime.conf
. Konfiguruje on również przypisanie rozszerzenie pliku ↔ typ mime.
Ze względów bezpieczeństwa nie jest możliwa konfiguracja DokuWiki dopuszczająca wszystkie typy plików.
Nigdy nie włączaj przesyłania HTML na niezabezpieczonych wiki, jako że otwiera to luki Cross Site Scripting przez JavaScript. Włączaj to tylko dla zaufanych użytkowników. Powinieneś również wyłączyć dodatkowo opcję iexssprotect przed dodaniem typu mime HTML w pliku konfiguracyjnym.
Dodatkowe ikony w podobnym stylu dostępne są na http://www.splitbrain.org/projects/file_icons
Możesz znaleźć dowolne rozszerzenie pliku wraz z jego typem mime na http://www.file-ext.com/
Dodawanie kolejnych typów mime
Dodatkowe typy mime mogą być dopisane w mime.local.conf
(musisz ten plik utworzyć). 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:
- mime.local.conf
# 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)1) 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.
Default Mime Types
The default install contains the following configurations:
Extension | Mime type | Icon |
---|---|---|
jpg | image/jpeg | |
jpeg | image/jpeg | |
gif | image/gif | |
png | image/png | |
swf | application/x-shockwave-flash | |
mp3 | audio/mpeg | |
ogg | audio/ogg | |
wav | audio/wav | |
tgz | !application/octet-stream | |
tar | !application/x-gtar | |
gz | !application/octet-stream | |
bz2 | !application/octet-stream | |
zip | !application/zip | |
rar | !application/rar | |
7z | !application/x-7z-compressed | |
application/pdf | ||
ps | !application/postscript | |
rpm | !application/octet-stream | |
deb | !application/octet-stream | |
doc | !application/msword | |
xls | !application/msexcel | |
ppt | !application/mspowerpoint | |
rtf | !application/msword | |
docx | !application/vnd.openxmlformats-officedocument.wordprocessingml.document | |
xlsx | !application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | |
pptx | !application/vnd.openxmlformats-officedocument.presentationml.presentation | |
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 | |
txt | text/plain | |
conf | text/plain | |
xml | text/xml | |
csv | text/csv |