Store properly the book on the database
This commit is contained in:
parent
c15f17c25a
commit
c01c465330
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ func processFile(req uploadRequest) {
|
||||||
|
|
||||||
epub, err := openMultipartEpub(req.file)
|
epub, err := openMultipartEpub(req.file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Not valid epub uploaded req.file", req.filename, ":", err)
|
log.Println("Not valid epub uploaded file", req.filename, ":", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer epub.Close()
|
defer epub.Close()
|
||||||
|
@ -47,7 +47,7 @@ func processFile(req uploadRequest) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
book["req.file"] = id
|
book["file"] = id
|
||||||
db.InsertBook(book)
|
db.InsertBook(book)
|
||||||
log.Println("File uploaded:", req.filename)
|
log.Println("File uploaded:", req.filename)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue