Close uploaded file

This commit is contained in:
Meutel 2017-07-27 19:59:43 +02:00
parent afcdb97e62
commit b9344dcf82
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ func handleForm(res http.ResponseWriter, req *http.Request) error {
if err != nil {
return err
}
defer file.Close()
tmpFile, err := os.Create(filepath.Join(os.TempDir(), header.Filename))
if err != nil {