소스 검색

Merge pull request #1499 from jorry2008/patch-3

使用缩略图,且对接OSS bug
Jiang Qinghua 3 년 전
부모
커밋
76ae9e4164
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Form/Field/ImageField.php

+ 2 - 2
src/Form/Field/ImageField.php

@@ -182,9 +182,9 @@ trait ImageField
             });
 
             if (! is_null($this->storagePermission)) {
-                $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode(), $this->storagePermission);
+                $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode()->stream(), $this->storagePermission);
             } else {
-                $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode());
+                $this->getStorage()->put("{$this->getDirectory()}/{$path}", $image->encode()->stream());
             }
         }