Check for errors during file copy
This commit is contained in:
parent
1337789403
commit
3ebe2ab765
|
@ -39,7 +39,10 @@ func uploadFile(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Printf("Error happened opening file: %v\n", err)
|
log.Printf("Error happened opening file: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
io.Copy(f, file)
|
_, err = io.Copy(f, file)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("Error happened writing file: %v\n", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func server() {
|
func server() {
|
||||||
|
|
Loading…
Reference in New Issue