作者 lyh

gx

@@ -51,10 +51,8 @@ class AmazonS3Service @@ -51,10 +51,8 @@ class AmazonS3Service
51 'SourceFile' => $body, 51 'SourceFile' => $body,
52 // 'ACL' => 'public-read', // 设置图片为公共可读,可根据需求修改 52 // 'ACL' => 'public-read', // 设置图片为公共可读,可根据需求修改
53 ]); 53 ]);
54 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('ok:'.$result['ObjectURL'], true) . PHP_EOL, FILE_APPEND);  
55 return $result['ObjectURL']; 54 return $result['ObjectURL'];
56 } catch (S3Exception $e) { 55 } catch (S3Exception $e) {
57 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('失败'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND);  
58 return false; 56 return false;
59 } 57 }
60 } 58 }