diff --git a/example/templates/index.html b/example/templates/index.html index 3821d4a..07ba874 100644 --- a/example/templates/index.html +++ b/example/templates/index.html @@ -33,7 +33,10 @@

File size limited to {{.Maxsize}}.

-
- +
{{if .Links}} + + {{end}}
diff --git a/example/templates/upload.html b/example/templates/upload.html deleted file mode 100644 index f731132..0000000 --- a/example/templates/upload.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - Partage - - -
- -

partage

-
- - - diff --git a/partage.go b/partage.go index c809644..308845e 100644 --- a/partage.go +++ b/partage.go @@ -204,8 +204,11 @@ func uploaderPost(w http.ResponseWriter, r *http.Request) { switch r.PostFormValue("output") { case "html": - data := templatedata{Links: links} - servetemplate(w, "/upload.html", data) + data := templatedata{ + Maxsize: humanize.IBytes(uint64(conf.maxsize)), + Links: links, + } + servetemplate(w, "/index.html", data) case "json": data, _ := json.Marshal(links) w.Write(data)