mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
compression tweaks
This commit is contained in:
parent
df14f6bab2
commit
ecd5742b22
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user