Forráskód Böngészése

修复 intervention/image 无法使用bug

jqh 5 éve
szülő
commit
d83bf73edf

+ 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());
     }
 
 }