Reset the reader to store it on gridfs
This commit is contained in:
parent
d8bfcb2ef2
commit
5794a1fe1b
1 changed files with 1 additions and 0 deletions
|
@ -34,6 +34,7 @@ func uploadPostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
book := parseFile(epub)
|
book := parseFile(epub)
|
||||||
title, _ := book["title"].(string)
|
title, _ := book["title"].(string)
|
||||||
|
file.Seek(0, 0)
|
||||||
id, err := StoreNewFile(title, file)
|
id, err := StoreNewFile(title, file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error storing book (", title, "):", err)
|
log.Println("Error storing book (", title, "):", err)
|
||||||
|
|
Reference in a new issue