You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
rename files and folders
This commit is contained in:
@@ -9,7 +9,8 @@ import (
|
||||
)
|
||||
|
||||
// ServeHTTP is used to serve the content of Browse page
|
||||
// using Browse middleware from Caddy
|
||||
// using Browse middleware from Caddy. It handles the requests
|
||||
// for DELETE, POST, GET and PUT related to /browse interface.
|
||||
func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, error) {
|
||||
// Removes the page main path from the URL
|
||||
r.URL.Path = strings.Replace(r.URL.Path, "/admin/browse", "", 1)
|
||||
@@ -21,6 +22,8 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, e
|
||||
return POST(w, r, c)
|
||||
case "GET":
|
||||
return GET(w, r, c)
|
||||
case "PUT":
|
||||
return PUT(w, r, c)
|
||||
default:
|
||||
return 400, errors.New("Invalid method.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user