Improved gzip detection

This commit is contained in:
Dane Everitt 2017-01-27 16:47:50 -05:00
parent 4b0197f2be
commit 1679d866a5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -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.');
}
}