From ccb7d81f1acc1edab793cf43c630d03f4c281780 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 22 Mar 2021 23:31:58 +0000 Subject: [PATCH] fup: allow PUT without filename --- web/fup/fuphttp/fuphttp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/fup/fuphttp/fuphttp.go b/web/fup/fuphttp/fuphttp.go index f478bb9a32..148ef739e0 100644 --- a/web/fup/fuphttp/fuphttp.go +++ b/web/fup/fuphttp/fuphttp.go @@ -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)