Add version

This commit is contained in:
2026-08-29 21:02:18 +02:00
parent 1b45fb4b8a
commit 712e9d4dce
5 changed files with 70 additions and 2 deletions
+3
View File
@@ -36,6 +36,7 @@ const maxMultipartMemory int64 = 32 << 20 // 32MB
var indexHTML *template.Template
var maxUploadSize int64 = defaultMaxUploadSize
var version = "dev"
func main() {
uploadDir = os.Getenv("UPLOAD_DIR")
@@ -74,6 +75,7 @@ func main() {
http.HandleFunc("/", handleRequest)
log.Printf("Starting server on port %s, upload directory: %s", port, uploadDir)
log.Printf("Version: %s", version)
log.Printf("Files expires after: %v (DRYRUN_CLEAN=%v)", fileExpires, dryRun)
log.Printf("Max upload size: %d bytes", maxUploadSize)
if fileExpires != 0 {
@@ -446,6 +448,7 @@ func serveFrontpage(w http.ResponseWriter, r *http.Request) {
"Proto": proto,
"Host": host,
"MaxUploadSize": maxUploadSize,
"Version": version,
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")