From ecd5742b2235167b51014f5c9fa611655756700c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 28 Mar 2019 15:59:39 +0100 Subject: [PATCH] compression tweaks --- client/src/routes/Publish/Files/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index eb33478..be53b9f 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -39,10 +39,18 @@ const getFileCompression = async (contentType: string) => { contentType === 'application/x-lzma' || contentType === 'application/x-xz' || contentType === 'application/x-tar' || + contentType === 'application/x-gtar' || contentType === 'application/x-bzip2' || - contentType === 'application/x-7z-compressed' + contentType === 'application/x-7z-compressed' || + contentType === 'application/x-rar-compressed' || + contentType === 'application/x-apple-diskimage' ) { const contentTypeSplit = contentType.split('/') + + if (contentTypeSplit[1].includes('x-')) { + return contentTypeSplit[1].replace('x-', '') + } + return contentTypeSplit[1] } else { return 'none'