feat: file manager with browse, search, upload, chmod/chown
- Full file browser page at /files with lazy-load, breadcrumbs, drag&drop - FileBrowserModal component for path selection from Samba/NFS forms - PathField component replaces bare inputs in share/export forms - Backend: /api/files/* routes with List, Mkdir, Rename, Delete, Chmod, Chown, Upload, Download, Preview, Search - Reuses NASCTL_ALLOWED_ROOTS for path validation - NASCTL_UPLOAD_MAX_BYTES (100MB) and NASCTL_PREVIEW_MAX_BYTES (256KB) env vars - Capabilities endpoint returns chmod/chown availability (requires root) - Version bump: 0.3.2 -> 0.4.0
This commit is contained in:
@@ -69,6 +69,22 @@ func NewRouter(s *Server) chi.Router {
|
||||
item.Delete("/", s.handleDeleteUser)
|
||||
})
|
||||
})
|
||||
|
||||
protected.Route("/files", func(files chi.Router) {
|
||||
files.Get("/capabilities", s.handleCapabilities)
|
||||
files.Get("/roots", s.handleListRoots)
|
||||
files.Get("/", s.handleList)
|
||||
files.Get("/info", s.handleInfo)
|
||||
files.Post("/mkdir", s.handleMkdir)
|
||||
files.Post("/rename", s.handleRename)
|
||||
files.Post("/chmod", s.handleChmod)
|
||||
files.Post("/chown", s.handleChown)
|
||||
files.Delete("/", s.handleDelete)
|
||||
files.Post("/upload", s.handleUpload)
|
||||
files.Get("/download", s.handleDownload)
|
||||
files.Get("/preview", s.handlePreview)
|
||||
files.Get("/search", s.handleSearch)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user