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