From c79e605b60040c4c0e5c792fa447487c2b8ae246 Mon Sep 17 00:00:00 2001 From: horus_arch Date: Mon, 15 Jun 2015 13:38:47 +0200 Subject: Use flex to extract html. Icono-font used for icons. --- upload.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'upload.go') diff --git a/upload.go b/upload.go index 6e0ce56..daefd47 100644 --- a/upload.go +++ b/upload.go @@ -12,7 +12,7 @@ import ( func uploadHandler(dir string, quiet bool) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { - // uhttpd strong + // µhttpd strong w.Header().Set("Server", "uhttpd") // we are handling the upload @@ -75,7 +75,10 @@ func uploadHandler(dir string, quiet bool) http.Handler { return } - err = tmpl.Execute(w, struct{ File string }{File: header.Filename}) + err = tmpl.Execute(w, struct { + File string + Favicon template.HTML + }{File: header.Filename, Favicon: getFavicon()}) if err != nil { log.Println(err.Error()) w.WriteHeader(500) @@ -96,7 +99,7 @@ func uploadHandler(dir string, quiet bool) http.Handler { return } - err = tmpl.Execute(w, nil) + err = tmpl.Execute(w, struct{ Favicon template.HTML }{Favicon: getFavicon()}) if err != nil { log.Println(err.Error()) w.WriteHeader(500) -- cgit v1.2.3