diff options
author | clsr <clsr@clsr.net> | 2016-11-15 15:17:45 +0100 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-11-15 19:28:43 +0100 |
commit | 1e55e61786eaedd59c067f4306fb8427dc92ef52 (patch) | |
tree | c24521f8d70d39508b4ed751c60e0f79891bfa48 /api.go | |
parent | 1583e219cd6eda19c3e7158950e5be9c87d9a8de (diff) | |
download | gomf-1e55e61786eaedd59c067f4306fb8427dc92ef52.tar.gz gomf-1e55e61786eaedd59c067f4306fb8427dc92ef52.zip |
Add logging support
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -67,7 +67,7 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { output := r.FormValue("output") resp := response{Files: []result{}} - if r.Method == http.MethodGet && output == "html" { + if r.Method == http.MethodGet && (output == "html" || output == "") { respond(w, output, resp) return } @@ -113,6 +113,7 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { Hash: hex.EncodeToString(bhash), Size: size, } + LogUpload(r, res) resp.Files = append(resp.Files, res) part.Close() |