This commit is contained in:
Maxime Renou 2019-02-22 19:25:28 +01:00
parent 9006459a15
commit 85f081f286
1 changed files with 4 additions and 2 deletions

View File

@ -123,8 +123,10 @@ class Storage
$camel = ucfirst(Container::camelize($attribute));
if ($file instanceof UploadedFile) {
$file_hash .= strlen($file->getExtension()) ? '.'.$file->getExtension() : '';
if (!is_null($storage_annotation->mime)) {
$file_hash .= strlen($file->getClientOriginalExtension()) > 0 ? '.'.$file->getClientOriginalExtension() : '';
if (!is_null($storage_annotation->mime))
{
$valid = true;
if (count(explode('/', $storage_annotation->mime)) > 1) {
$valid = strtolower($storage_annotation->mime) == $file->getMimeType();