소스 검색

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