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(
|
return $this->getHttpClient()->post(
|
||||||
sprintf('/api/servers/%s/files/decompress', $this->server->uuid),
|
sprintf('/api/servers/%s/files/decompress', $this->server->uuid),
|
||||||
[
|
[
|
||||||
'json ' => [
|
'json' => [
|
||||||
'root' => $root ?? '/',
|
'root' => $root ?? '/',
|
||||||
'file' => $file,
|
'file' => $file,
|
||||||
],
|
],
|
||||||
|
|
|
@ -26,9 +26,17 @@ export const rawDataToFileObject = (data: FractalResponseData): FileObject => ({
|
||||||
|
|
||||||
isArchiveType: function () {
|
isArchiveType: function () {
|
||||||
return this.isFile && [
|
return this.isFile && [
|
||||||
'application/zip',
|
'application/vnd.rar', // .rar
|
||||||
'application/gzip',
|
'application/x-rar-compressed', // .rar (2)
|
||||||
'application/x-tar',
|
'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;
|
].indexOf(this.mimetype) >= 0;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue