summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-03 16:31:17 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-03 16:31:17 +0900
commitc2938cf488c131243c4f9f8ce3a56fad4b025f68 (patch)
tree6654890462e35f54dc4ff9915fd0106cfce97602
parentaeaa24a239cf29f7bc98363339ccdbd51a4015f0 (diff)
(김준회) dolce: 업로드 경로 오류 수정
-rw-r--r--lib/vendor-document-list/dolce-upload-service.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/vendor-document-list/dolce-upload-service.ts b/lib/vendor-document-list/dolce-upload-service.ts
index 7717877b..35058a65 100644
--- a/lib/vendor-document-list/dolce-upload-service.ts
+++ b/lib/vendor-document-list/dolce-upload-service.ts
@@ -841,7 +841,13 @@ class DOLCEUploadService {
// ✅ DB에 저장된 경로 형태: "/documents/[uuid].ext"
// 개발: public/documents/[uuid].ext
// 프로덕션: /evcp_nas/documents/[uuid].ext
- actualFilePath = path.join(config.baseDir, 'public', filePath.substring(1)); // 앞의 '/' 제거
+ if (config.isProduction) {
+ // 프로덕션: NAS 경로에 직접 documents 추가
+ actualFilePath = path.join(config.baseDir, filePath.substring(1)); // 앞의 '/' 제거
+ } else {
+ // 개발: public/documents/[uuid].ext
+ actualFilePath = path.join(config.baseDir, 'public', filePath.substring(1)); // 앞의 '/' 제거
+ }
console.log(`📁 documents 경로 처리: ${filePath} → ${actualFilePath}`);
}
else if (filePath.startsWith('/api/files')) {