Explorar el Código

Merge pull request #1499 from jorry2008/patch-3

使用缩略图,且对接OSS bug
Jiang Qinghua hace 3 años
padre
commit
76ae9e4164
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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());
             }
         }