This commit is contained in:
Baobhan Sith
2025-04-30 11:04:12 +08:00
parent 27591bee91
commit 35eb2fcb3d
4 changed files with 71 additions and 37 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ const uploadsPath = path.join(__dirname, '../uploads');
if (!fs.existsSync(uploadsPath)) { // 确保 uploads 目录存在
fs.mkdirSync(uploadsPath, { recursive: true });
}
app.use('/uploads', express.static(uploadsPath));
// app.use('/uploads', express.static(uploadsPath)); // 不再需要,文件通过 API 提供
// 扩展 Express Request 类型