fup: allow PUT without filename

This commit is contained in:
Luke Granger-Brown 2021-03-22 23:31:58 +00:00
parent 48be007f79
commit ccb7d81f1a

View file

@ -105,7 +105,7 @@ func (a *Application) Handler() http.Handler {
r.HandleFunc("/", renderTemplate(a.indexTmpl))
r.HandleFunc("/paste", renderTemplate(a.pasteTmpl))
r.HandleFunc("/raw/{filename}", a.rawDownload)
r.HandleFunc("/upload", a.upload).Methods("POST")
r.HandleFunc("/upload", a.upload).Methods("POST", "PUT")
r.HandleFunc("/upload/{filename}", a.upload).Methods("PUT")
r.HandleFunc("/{filename}", a.view)