forked from Alex/Pterodactyl-Panel
Add additional mimetypes to check if a file is an archive
This commit is contained in:
parent
b6e31096f0
commit
df385cef3a
@ -26,9 +26,17 @@ export const rawDataToFileObject = (data: FractalResponseData): FileObject => ({
|
||||
|
||||
isArchiveType: function () {
|
||||
return this.isFile && [
|
||||
'application/zip',
|
||||
'application/gzip',
|
||||
'application/x-tar',
|
||||
'application/vnd.rar', // .rar
|
||||
'application/x-rar-compressed', // .rar (2)
|
||||
'application/x-tar', // .tar
|
||||
'application/x-br', // .tar.br
|
||||
'application/x-bzip2', // .tar.bz2, .bz2
|
||||
'application/gzip', // .tar.gz, .gz
|
||||
'application/x-lzip', // .tar.lz4, .lz4 (not sure if this mime type is correct)
|
||||
'application/x-sz', // .tar.sz, .sz (not sure if this mime type is correct)
|
||||
'application/x-xz', // .tar.xz, .xz
|
||||
'application/zstd', // .tar.zst, .zst
|
||||
'application/zip', // .zip
|
||||
].indexOf(this.mimetype) >= 0;
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user