Check error return
This commit is contained in:
parent
f1cfb8eea8
commit
9f06d24602
1 changed files with 5 additions and 1 deletions
|
@ -48,7 +48,11 @@ func processFile(req uploadRequest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
book["file"] = id
|
book["file"] = id
|
||||||
db.InsertBook(book)
|
err = db.InsertBook(book)
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Error storing metadata (", title, "):", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
log.Println("File uploaded:", req.filename)
|
log.Println("File uploaded:", req.filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue