作者 lyh

gx

@@ -68,7 +68,6 @@ class AmazonS3Service @@ -68,7 +68,6 @@ 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 -  
72 $body = $files; 71 $body = $files;
73 try { 72 try {
74 $result = $this->s3->putObject([ 73 $result = $this->s3->putObject([
@@ -76,6 +75,8 @@ class AmazonS3Service @@ -76,6 +75,8 @@ class AmazonS3Service
76 'Key' => $key, 75 'Key' => $key,
77 'Body' => file_get_contents($body), 76 'Body' => file_get_contents($body),
78 ]); 77 ]);
  78 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
  79 +
79 return $result['ObjectURL']; 80 return $result['ObjectURL'];
80 } catch (AwsException $e) { 81 } catch (AwsException $e) {
81 @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND); 82 @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND);