app/Http/Controllers/ReceiptController.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 24s
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 24s
This commit is contained in:
parent
29ce166b4d
commit
3d79e24ff5
@ -181,6 +181,18 @@ class ReceiptController extends Controller
|
||||
|
||||
$krgmStoragePath = config('app.krgm_storage_path');
|
||||
$linkPath = public_path('other-storage');
|
||||
if (!file_exists($krgmStoragePath)) {
|
||||
\Log::error('KRGM path not found: ' . $krgmStoragePath);
|
||||
abort(404, '画像パスが見つかりません。');
|
||||
}
|
||||
if (!file_exists($linkPath)) {
|
||||
$result = symlink($krgmStoragePath, $linkPath);
|
||||
\Log::info('Symlink result: ' . ($result ? 'success' : 'failed'));
|
||||
if (!$result) {
|
||||
\Log::error('Symlink failed');
|
||||
abort(500, 'リンク作成失敗');
|
||||
}
|
||||
}
|
||||
if (!file_exists($linkPath)) {
|
||||
symlink($krgmStoragePath, $linkPath);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user