Merge pull request #2178 from pterodactyl/feature/decompress
Fix empty request body to wings when decompressing a file
This commit is contained in:
commit
3b80597899
2 changed files with 12 additions and 4 deletions
|
@ -256,7 +256,7 @@ class DaemonFileRepository extends DaemonRepository
|
|||
return $this->getHttpClient()->post(
|
||||
sprintf('/api/servers/%s/files/decompress', $this->server->uuid),
|
||||
[
|
||||
'json ' => [
|
||||
'json' => [
|
||||
'root' => $root ?? '/',
|
||||
'file' => $file,
|
||||
],
|
||||
|
|
|
@ -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 a new issue