Skip to content
This repository was archived by the owner on Aug 22, 2021. It is now read-only.

Commit 4b940be

Browse files
committed
Fixed overtrue#41
1 parent 63cff0c commit 4b940be

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/StorageManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function fileHasError(UploadedFile $file, array $config)
166166
} elseif ($file->getSize() > $config['max_size']) {
167167
$error = 'upload.ERROR_SIZE_EXCEED';
168168
} elseif (!empty($config['allow_files']) &&
169-
!in_array('.'.$file->guessExtension(), $config['allow_files'])) {
169+
!in_array('.'.$file->getClientOriginalExtension(), $config['allow_files'])) {
170170
$error = 'upload.ERROR_TYPE_NOT_ALLOWED';
171171
}
172172

src/UrlResolverTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public function url($path)
5353
} elseif ($adapter instanceof LocalAdapter) {
5454
return $this->getLocalUrl($path);
5555
}
56+
5657
throw new RuntimeException('This driver does not support retrieving URLs.');
5758
}
5859

0 commit comments

Comments
 (0)