commit f63e6add2dd53befa137ffe9fe4af52713484204
parent 12418b12ae7d6e565f21359426570278cec3f0fa
Author: breadcat <breadcat@users.noreply.github.com>
Date: Mon, 22 Sep 2025 16:19:01 +0100
Rename upload to add
Better reflects the pages function
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/main.go b/main.go
@@ -103,7 +103,7 @@ func main() {
}).ParseGlob("templates/*.html"))
http.HandleFunc("/", listFilesHandler)
- http.HandleFunc("/upload", uploadHandler)
+ http.HandleFunc("/add", uploadHandler)
http.HandleFunc("/upload-url", uploadFromURLHandler)
http.HandleFunc("/file/", fileRouter)
http.HandleFunc("/tags", tagsHandler)
@@ -328,14 +328,14 @@ func untaggedFilesHandler(w http.ResponseWriter, r *http.Request) {
tmpl.ExecuteTemplate(w, "untagged.html", pageData)
}
-// Upload a file
+// Add a file
func uploadHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodGet {
pageData := PageData{
- Title: "Upload File",
+ Title: "Add File",
Data: nil,
}
- tmpl.ExecuteTemplate(w, "upload.html", pageData)
+ tmpl.ExecuteTemplate(w, "add.html", pageData)
return
}
diff --git a/templates/upload.html b/templates/add.html