func fileUploadHandler(w http.ResponseWriter, r *http.Request) {
r.ParseMultipartForm(0)
file, handler, err := r.FormFile("file")
if err != nil {
fmt.Println(err)
return
}
defer file.close()
f, err := os.OpenFile(filePath, os.O_WRONLY|os.O_CREATE, 0666)
if err != nil {
fmt.Println(err)
return
}
defer f.Close()
io.Copy(f, file)
}