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:
@@ -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
|
||||
|
||||
@@ -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] || '')
|
||||
|
||||
Reference in New Issue
Block a user