This commit is contained in:
2026-06-21 01:18:50 +03:00
parent afd438930e
commit 445a6aab94
21 changed files with 70 additions and 73 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
package main
import (
"net/http"
"log"
"net/http"
)
type imageTransform struct {
@@ -29,14 +29,14 @@ func indexHTML(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
log.Println("copy error:", err)
return
}
}
}
func main() {
http.HandleFunc("/", indexHTML)
http.Handle("POST /upload", imageTransform)
err := http.ListenAndServe(":8080", nil)
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Panicln(err)
}