Skip to content

Commit

Permalink
Merge pull request #4 from moriony/fix-mime-type
Browse files Browse the repository at this point in the history
Исправление проверки mime типа
  • Loading branch information
muxx authored Aug 25, 2017
2 parents 9154267 + f849740 commit 0ac4ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Services/FileUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(
*/
public function upload(UploadedFile $file)
{
$fileMimeType = $file->getClientMimeType();
$fileMimeType = $file->getMimeType();
if ($this->allowedTypes && !in_array($fileMimeType, $this->allowedTypes)) {
throw new \InvalidArgumentException(
sprintf('Files of type %s are not allowed.', $fileMimeType)
Expand Down

0 comments on commit 0ac4ada

Please sign in to comment.