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