Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use guessExtension to determine the file's extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig authored Oct 19, 2017
1 parent 4515956 commit c09a662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Transfer/Upload/UploadTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function saveTempFiles($extract)
$base = storage_path('app/' . $this->temp);
foreach ($this->files as $file) {
/** @var $file UploadedFile */
if ($extract === true && $file->clientExtension() === 'zip') {
if ($extract === true && $file->guessExtension() === 'zip') {
(new Zipper())->unzip($file->getRealPath(), $base);
} else {
$file->move($base, $file->getClientOriginalName());
Expand Down Expand Up @@ -140,4 +140,4 @@ protected function getBasename($file)
return array_pop($parts);
}

}
}

0 comments on commit c09a662

Please sign in to comment.