正在显示
1 个修改的文件
包含
1 行增加
和
0 行删除
| @@ -44,6 +44,7 @@ class AmazonS3Service | @@ -44,6 +44,7 @@ class AmazonS3Service | ||
| 44 | { | 44 | { |
| 45 | $key = $s3Key.'/'.$filename; | 45 | $key = $s3Key.'/'.$filename; |
| 46 | $Body = $binary ? $files : fopen($files->getRealPath(), 'r'); | 46 | $Body = $binary ? $files : fopen($files->getRealPath(), 'r'); |
| 47 | + $Body = is_resource($Body) ? stream_get_contents($Body) : $Body; | ||
| 47 | try { | 48 | try { |
| 48 | $result = $this->s3->putObject([ | 49 | $result = $this->s3->putObject([ |
| 49 | 'Bucket' => $this->bucket, | 50 | 'Bucket' => $this->bucket, |
-
请 注册 或 登录 后发表评论