fix: demo filebrowser uploads — increase nginx body size limit and add mock handlers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-09 18:12:28 +00:00
parent a2aa9657b1
commit e7b1a772b7
2 changed files with 18 additions and 0 deletions

View File

@@ -61,10 +61,12 @@ http {
# Proxy FileBrowser API to mock backend (demo mode)
location /app/filebrowser/ {
client_max_body_size 10G;
proxy_pass http://neode-backend:5959;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_request_buffering off;
}
# Serve AIUI SPA

View File

@@ -1367,6 +1367,22 @@ app.get('/app/filebrowser/api/resources', (req, res) => {
})
})
// FileBrowser upload (POST to resources path) — mock accepts and discards the body
app.post('/app/filebrowser/api/resources/*', (req, res) => {
req.resume()
req.on('end', () => res.sendStatus(200))
})
// FileBrowser delete
app.delete('/app/filebrowser/api/resources/*', (req, res) => {
res.sendStatus(200)
})
// FileBrowser rename
app.patch('/app/filebrowser/api/resources/*', (req, res) => {
res.sendStatus(200)
})
// FileBrowser raw file content (for text file reading)
app.get('/app/filebrowser/api/raw/*', (req, res) => {
const reqPath = '/' + decodeURIComponent(req.params[0] || '')