Add version
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user