From 9bdb81d8ff6d405c7c0c0df56ee84137da1e79cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 20 Mar 2026 09:17:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20presignedUrl=EC=97=90=EC=84=9C=20R2=20ex?= =?UTF-8?q?ists()=20=EC=B2=B4=ED=81=AC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - exists()가 매 요청마다 R2 HTTP HEAD 호출 → 개발서버에서 지연/500 발생 - temporaryUrl()은 로컬 서명 생성만 하므로 R2 접근 불필요 - 파일 미존재 시 브라우저가 R2에서 직접 404 수신 Co-Authored-By: Claude Opus 4.6 (1M context) --- app/Http/Controllers/Api/V1/FileStorageController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/V1/FileStorageController.php b/app/Http/Controllers/Api/V1/FileStorageController.php index 41e6486c..71076d73 100644 --- a/app/Http/Controllers/Api/V1/FileStorageController.php +++ b/app/Http/Controllers/Api/V1/FileStorageController.php @@ -133,8 +133,8 @@ public function presignedUrl(int $id, Request $request) $service = new FileStorageService; $file = $service->getFile($id); - if (! $file->file_path || ! Storage::disk('r2')->exists($file->file_path)) { - abort(404, 'File not found in storage'); + if (! $file->file_path) { + abort(404, 'File not found'); } $url = Storage::disk('r2')->temporaryUrl(