mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-28 08:04:45 +02:00
Improved gzip detection
This commit is contained in:
parent
4b0197f2be
commit
1679d866a5
@ -60,8 +60,8 @@ class Pack
|
||||
throw new DisplayException('The file provided does not appear to be valid.');
|
||||
}
|
||||
|
||||
if ($data['file_upload']->getMimeType() !== 'application/gzip') {
|
||||
throw new DisplayException('The file provided does not meet the required filetype of application/gzip.');
|
||||
if (! in_array($data['file_upload']->getMimeType(), ['application/gzip', 'application/x-gzip'])) {
|
||||
throw new DisplayException('The file provided (' . $data['file_upload']->getMimeType() . ') does not meet the required filetype of application/gzip.');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user