正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -68,15 +68,13 @@ class AmazonS3Service | @@ -68,15 +68,13 @@ class AmazonS3Service | ||
| 68 | { | 68 | { |
| 69 | $key = str_replace_url($files); | 69 | $key = str_replace_url($files); |
| 70 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($key, true) . PHP_EOL, FILE_APPEND); | 70 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($key, true) . PHP_EOL, FILE_APPEND); |
| 71 | - $body = $files; | ||
| 72 | try { | 71 | try { |
| 73 | $result = $this->s3->putObject([ | 72 | $result = $this->s3->putObject([ |
| 74 | 'Bucket' => $this->bucket, | 73 | 'Bucket' => $this->bucket, |
| 75 | 'Key' => $key, | 74 | 'Key' => $key, |
| 76 | - 'Body' => file_get_contents($body), | 75 | + 'Body' => file_get_contents($files), |
| 77 | ]); | 76 | ]); |
| 78 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); | 77 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND); |
| 79 | - | ||
| 80 | return $result['ObjectURL']; | 78 | return $result['ObjectURL']; |
| 81 | } catch (AwsException $e) { | 79 | } catch (AwsException $e) { |
| 82 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND); | 80 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND); |
-
请 注册 或 登录 后发表评论