Reset the reader to store it on gridfs

This commit is contained in:
Las Zenow 2013-04-16 03:28:05 +02:00
parent d8bfcb2ef2
commit 5794a1fe1b

View file

@ -34,6 +34,7 @@ func uploadPostHandler(w http.ResponseWriter, r *http.Request) {
book := parseFile(epub)
title, _ := book["title"].(string)
file.Seek(0, 0)
id, err := StoreNewFile(title, file)
if err != nil {
log.Println("Error storing book (", title, "):", err)