Skip to content

Commit 1679d86

Browse files
committed
Improved gzip detection
1 parent 4b0197f commit 1679d86

File tree

1 file changed

+2
-2
lines changed
  • app/Repositories/ServiceRepository

1 file changed

+2
-2
lines changed

app/Repositories/ServiceRepository/Pack.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function create(array $data)
6060
throw new DisplayException('The file provided does not appear to be valid.');
6161
}
6262

63-
if ($data['file_upload']->getMimeType() !== 'application/gzip') {
64-
throw new DisplayException('The file provided does not meet the required filetype of application/gzip.');
63+
if (! in_array($data['file_upload']->getMimeType(), ['application/gzip', 'application/x-gzip'])) {
64+
throw new DisplayException('The file provided (' . $data['file_upload']->getMimeType() . ') does not meet the required filetype of application/gzip.');
6565
}
6666
}
6767

0 commit comments

Comments
 (0)