mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-07-22 23:51:02 +00:00
update url routing, simplify; new templates
This commit is contained in:
parent
60eefa3915
commit
93b0ab8dd9
7 changed files with 32 additions and 31 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hacdias/caddy-hugo/page"
|
||||
"github.com/spf13/hugo/commands"
|
||||
|
|
@ -15,7 +16,9 @@ type fileInfo struct {
|
|||
}
|
||||
|
||||
// Execute sth
|
||||
func Execute(w http.ResponseWriter, r *http.Request, filename string) (int, error) {
|
||||
func Execute(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
filename := strings.Replace(r.URL.Path, "edit/", "", 1)
|
||||
|
||||
if r.Method == "POST" {
|
||||
r.ParseForm()
|
||||
err := ioutil.WriteFile(filename, []byte(r.Form["content"][0]), 0666)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue