1 | #**
|
---|
2 | * Define some Mime-Types, short and long form
|
---|
3 | *#
|
---|
4 |
|
---|
5 | ## MimeType to extension map for detecting file type
|
---|
6 | ## and showing proper icon
|
---|
7 | ## List of types match the icons in /solr/img/filetypes
|
---|
8 |
|
---|
9 | ## Short MimeType Names
|
---|
10 | ## Was called $supportedtypes
|
---|
11 | #set($supportedMimeTypes = "7z;ai;aiff;asc;audio;bin;bz2;c;cfc;cfm;chm;class;conf;cpp;cs;css;csv;deb;divx;doc;dot;eml;enc;file;gif;gz;hlp;htm;html;image;iso;jar;java;jpeg;jpg;js;lua;m;mm;mov;mp3;mpg;odc;odf;odg;odi;odp;ods;odt;ogg;pdf;pgp;php;pl;png;ppt;ps;py;ram;rar;rb;rm;rpm;rtf;sig;sql;swf;sxc;sxd;sxi;sxw;tar;tex;tgz;txt;vcf;video;vsd;wav;wma;wmv;xls;xml;xpi;xvid;zip")
|
---|
12 |
|
---|
13 | ## Long Form: map MimeType headers to our Short names
|
---|
14 | ## Was called $extMap
|
---|
15 | #set( $mimeExtensionsMap = {
|
---|
16 | "application/x-7z-compressed": "7z",
|
---|
17 | "application/postscript": "ai",
|
---|
18 | "application/pgp-signature": "asc",
|
---|
19 | "application/octet-stream": "bin",
|
---|
20 | "application/x-bzip2": "bz2",
|
---|
21 | "text/x-c": "c",
|
---|
22 | "application/vnd.ms-htmlhelp": "chm",
|
---|
23 | "application/java-vm": "class",
|
---|
24 | "text/css": "css",
|
---|
25 | "text/csv": "csv",
|
---|
26 | "application/x-debian-package": "deb",
|
---|
27 | "application/msword": "doc",
|
---|
28 | "message/rfc822": "eml",
|
---|
29 | "image/gif": "gif",
|
---|
30 | "application/winhlp": "hlp",
|
---|
31 | "text/html": "html",
|
---|
32 | "application/java-archive": "jar",
|
---|
33 | "text/x-java-source": "java",
|
---|
34 | "image/jpeg": "jpeg",
|
---|
35 | "application/javascript": "js",
|
---|
36 | "application/vnd.oasis.opendocument.chart": "odc",
|
---|
37 | "application/vnd.oasis.opendocument.formula": "odf",
|
---|
38 | "application/vnd.oasis.opendocument.graphics": "odg",
|
---|
39 | "application/vnd.oasis.opendocument.image": "odi",
|
---|
40 | "application/vnd.oasis.opendocument.presentation": "odp",
|
---|
41 | "application/vnd.oasis.opendocument.spreadsheet": "ods",
|
---|
42 | "application/vnd.oasis.opendocument.text": "odt",
|
---|
43 | "application/pdf": "pdf",
|
---|
44 | "application/pgp-encrypted": "pgp",
|
---|
45 | "image/png": "png",
|
---|
46 | "application/vnd.ms-powerpoint": "ppt",
|
---|
47 | "audio/x-pn-realaudio": "ram",
|
---|
48 | "application/x-rar-compressed": "rar",
|
---|
49 | "application/vnd.rn-realmedia": "rm",
|
---|
50 | "application/rtf": "rtf",
|
---|
51 | "application/x-shockwave-flash": "swf",
|
---|
52 | "application/vnd.sun.xml.calc": "sxc",
|
---|
53 | "application/vnd.sun.xml.draw": "sxd",
|
---|
54 | "application/vnd.sun.xml.impress": "sxi",
|
---|
55 | "application/vnd.sun.xml.writer": "sxw",
|
---|
56 | "application/x-tar": "tar",
|
---|
57 | "application/x-tex": "tex",
|
---|
58 | "text/plain": "txt",
|
---|
59 | "text/x-vcard": "vcf",
|
---|
60 | "application/vnd.visio": "vsd",
|
---|
61 | "audio/x-wav": "wav",
|
---|
62 | "audio/x-ms-wma": "wma",
|
---|
63 | "video/x-ms-wmv": "wmv",
|
---|
64 | "application/vnd.ms-excel": "xls",
|
---|
65 | "application/xml": "xml",
|
---|
66 | "application/x-xpinstall": "xpi",
|
---|
67 | "application/zip": "zip"
|
---|
68 | })
|
---|