deploy: auto commit repo-root changes 2026-06-13 11:43:39
This commit is contained in:
@@ -839,7 +839,10 @@ class CommunityController extends BaseApiController
|
||||
$relativeDir = 'uploads/ai_lottery_posts/' . date('Ymd');
|
||||
$publicRoot = rtrim(public_path(), DIRECTORY_SEPARATOR . '/');
|
||||
$targetDir = $publicRoot . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $relativeDir);
|
||||
if (!is_dir($targetDir) && !mkdir($targetDir, 0755, true) && !is_dir($targetDir)) {
|
||||
if (!is_dir($targetDir) && !@mkdir($targetDir, 0755, true) && !is_dir($targetDir)) {
|
||||
return '';
|
||||
}
|
||||
if (!is_writable($targetDir)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -847,7 +850,7 @@ class CommunityController extends BaseApiController
|
||||
$relativeUri = $relativeDir . '/' . $filename;
|
||||
$targetPath = $targetDir . DIRECTORY_SEPARATOR . $filename;
|
||||
|
||||
if (!is_file($targetPath) && file_put_contents($targetPath, $body) === false) {
|
||||
if (!is_file($targetPath) && @file_put_contents($targetPath, $body) === false) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user