Skip to content

Commit

Permalink
return string
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Feb 14, 2018
1 parent 0bd1e8a commit 8e0587e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FileAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ protected function getOriginalName($contentDisposition)
protected function getMimeType($originalName)
{
$mimeType = (string) $this->request->header('content-type');

if (empty($mimeType) === true) {
$mimeType = $this->files->mimeType($originalName);

if ($mimeType === false) {
return '';
}
}

return $mimeType;
Expand Down

0 comments on commit 8e0587e

Please sign in to comment.