Update 04.5.md

Add fh.Close() to the "Clients upload files" demo
This commit is contained in:
Tony Bai
2017-10-30 05:11:26 -05:00
committed by GitHub
parent 01533e0234
commit dcd2635cec

View File

@@ -124,6 +124,7 @@ func postFile(filename string, targetUrl string) error {
fmt.Println("error opening file")
return err
}
defer fh.Close()
//iocopy
_, err = io.Copy(fileWriter, fh)