浏览代码

修复 intervention/image 无法使用bug

jqh 5 年之前
父节点
当前提交
d83bf73edf
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/Form/Field/BootstrapImage.php
  2. 1 1
      src/Form/Field/BootstrapMultipleImage.php
  3. 1 1
      src/Form/Field/Image.php

+ 1 - 1
src/Form/Field/BootstrapImage.php

@@ -75,7 +75,7 @@ class BootstrapImage extends BootstrapFile
 
         $this->name = $this->getStoreName($image);
 
-        $this->callInterventionMethods($image->getRealPath());
+        $this->callInterventionMethods($image->getRealPath(), $image->getMimeType());
 
         return $this->uploadAndDeleteOriginal($image);
     }

+ 1 - 1
src/Form/Field/BootstrapMultipleImage.php

@@ -31,7 +31,7 @@ class BootstrapMultipleImage extends BootstrapMultipleFile
     {
         $this->name = $this->getStoreName($image);
 
-        $this->callInterventionMethods($image->getRealPath());
+        $this->callInterventionMethods($image->getRealPath(), $image->getMimeType());
 
         return tap($this->upload($image), function () {
             $this->name = null;

+ 1 - 1
src/Form/Field/Image.php

@@ -118,7 +118,7 @@ class Image extends File
      */
     protected function prepareFile(UploadedFile $file)
     {
-        $this->callInterventionMethods($file->getRealPath(), $file->getClientMimeType());
+        $this->callInterventionMethods($file->getRealPath(), $file->getMimeType());
     }
 
 }