mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add more extension in get_extension()
This commit is contained in:
parent
ad0f3b2cfe
commit
7a0f2a784e
|
@ -609,6 +609,7 @@ function get_extension($mimetype) { /* {{{ */
|
|||
if(empty($mimetype)) return false;
|
||||
switch($mimetype) {
|
||||
case 'image/bmp': return '.bmp';
|
||||
case 'image/x-ms-bmp': return '.bmp';
|
||||
case 'image/cis-cod': return '.cod';
|
||||
case 'image/gif': return '.gif';
|
||||
case 'image/ief': return '.ief';
|
||||
|
@ -630,14 +631,28 @@ function get_extension($mimetype) { /* {{{ */
|
|||
case 'image/x-jps': return '.jps';
|
||||
case 'image/x-freehand': return '.fh';
|
||||
case 'image/svg+xml': return '.svg';
|
||||
case 'audio/mp3': return '.mp3';
|
||||
case 'audio/mpeg': return '.mpeg';
|
||||
case 'audio/ogg': return '.ogg';
|
||||
case 'video/mp4': return '.mp4';
|
||||
case 'video/webm': return '.webm';
|
||||
case 'application/zip': return '.zip';
|
||||
case 'application/x-gzip': return '.gz';
|
||||
case 'application/x-rar': return '.rar';
|
||||
case 'application/x-compressed-tar': return '.tgz';
|
||||
case 'application/pdf': return '.pdf';
|
||||
case 'application/dxf': return '.dxf';
|
||||
case 'application/msword': return '.doc';
|
||||
case 'application/postscript': return '.ps';
|
||||
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': return '.docx';
|
||||
case 'application/vnd.openxmlformats-officedocument.presentationml.presentation': return '.pptx';
|
||||
case 'text/plain': return '.txt';
|
||||
case 'text/csv': return '.csv';
|
||||
case 'text/rtf': return '.rtf';
|
||||
case 'text/xml': return '.xml';
|
||||
case 'text/x-php': return '.php';
|
||||
case 'text/x-tex': return '.tex';
|
||||
case 'message/rfc822': return '.eml';
|
||||
default: return false;
|
||||
}
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user