refactor: 重构文件存储路径并清理冗余代码
- 将项目文件存储从 public/uploads 迁移至项目根目录专用目录 - 更新所有前端页面的路径提示文本与API请求路径 - 移除冗余的列车详情展开收起功能及相关代码 - 重构服务器端文件路径处理逻辑,增强路径访问安全性 - 清理旧注释和未使用的变量与函数
This commit is contained in:
@@ -1251,7 +1251,7 @@
|
||||
|
||||
async function loadList() {
|
||||
try {
|
||||
const res = await fetch('/api/files/content?path=uploads/list.txt');
|
||||
const res = await fetch('/api/files/content?path=list.txt');
|
||||
const data = await res.json();
|
||||
listData = [];
|
||||
if (data.success && data.content) {
|
||||
@@ -1418,7 +1418,7 @@
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({
|
||||
path: 'uploads/list.txt',
|
||||
path: 'list.txt',
|
||||
content: content + '\n'
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user