From ee7f393e67cc44a6b9dd29f4b03968d6dc693e52 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 15 Dec 2024 19:58:29 +0100 Subject: [PATCH] enable mobi and rtf files for upload (fix for #3258) --- cps/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/__init__.py b/cps/__init__.py index 1b1fa191..eb94fcfb 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -56,7 +56,7 @@ mimetypes.add_type('application/xhtml+xml', '.xhtml') mimetypes.add_type('application/epub+zip', '.epub') mimetypes.add_type('application/epub+zip', '.kepub') mimetypes.add_type('application/fb2+zip', '.fb2') -mimetypes.add_type('application/octet-stream', '.mobi') +mimetypes.add_type('application/x-mobipocket-ebook', '.mobi') mimetypes.add_type('application/octet-stream', '.prc') mimetypes.add_type('application/vnd.amazon.ebook', '.azw') mimetypes.add_type('application/x-mobi8-ebook', '.azw3') @@ -78,6 +78,7 @@ mimetypes.add_type('application/ogg', '.oga') mimetypes.add_type('text/css', '.css') mimetypes.add_type('application/x-ms-reader', '.lit') mimetypes.add_type('text/javascript; charset=UTF-8', '.js') +mimetypes.add_type('text/rtf', '.rtf') log = logger.create()