From 383ea58e2f38c72a8f7beb0ce35c65a005f2f63a Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Fri, 27 May 2011 16:40:16 +0200 Subject: [PATCH] create special MIME type for .cdr files so that they aren't interpreted as image files --- integrator/base.py | 4 ++-- integrator/mime.types | 2 +- text/mimetypes.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integrator/base.py b/integrator/base.py index 3a7b557..98be980 100644 --- a/integrator/base.py +++ b/integrator/base.py @@ -213,5 +213,5 @@ class MimeTypes(dict): mimeTypes = MimeTypes() -mimetypes.init(mimetypes.knownfiles + - [os.path.join(os.path.dirname(__file__), 'mime.types')]) +mimetypes.init([os.path.join(os.path.dirname(__file__), 'mime.types')] + + mimetypes.knownfiles) diff --git a/integrator/mime.types b/integrator/mime.types index f46696b..f95173c 100644 --- a/integrator/mime.types +++ b/integrator/mime.types @@ -346,6 +346,7 @@ application/x-cdf cdf application/x-cdlink vcd application/x-chess-pgn pgn application/x-core +application/x-coreldraw cdr application/x-cpio cpio application/x-csh csh application/x-debian-package deb udeb @@ -555,7 +556,6 @@ image/vnd.svf image/vnd.wap.wbmp wbmp image/vnd.xiff image/x-cmu-raster ras -image/x-coreldraw cdr image/x-coreldrawpattern pat image/x-coreldrawtemplate cdt image/x-corelphotopaint cpt diff --git a/text/mimetypes.py b/text/mimetypes.py index 6722e76..977415b 100644 --- a/text/mimetypes.py +++ b/text/mimetypes.py @@ -43,6 +43,7 @@ extensions = { 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': 'xltx', 'application/vnd.visio': 'vsd', + 'application/x-coreldraw': 'cdr', 'application/x-pdf': 'pdf', 'image/gif': 'gif', 'image/jpeg': 'jpg',