Add the epub extension
This commit is contained in:
parent
206775fa6a
commit
67c90e8096
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ func uploadPostHandler(w http.ResponseWriter, r *http.Request, sess *Session) {
|
||||||
book := parseFile(epub)
|
book := parseFile(epub)
|
||||||
title, _ := book["title"].(string)
|
title, _ := book["title"].(string)
|
||||||
file.Seek(0, 0)
|
file.Seek(0, 0)
|
||||||
id, err := StoreNewFile(title, file)
|
id, err := StoreNewFile(title+".epub", file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error storing book (", title, "):", err)
|
log.Println("Error storing book (", title, "):", err)
|
||||||
continue
|
continue
|
||||||
|
|
Reference in a new issue