Upload multiple files

This commit is contained in:
Las Zenow 2012-08-22 10:33:57 +02:00
parent 1ed4de177f
commit f35947c644
3 changed files with 46 additions and 35 deletions

View file

@ -1,8 +1,8 @@
package main
import (
"html/template"
"git.gitorious.org/go-pkg/epub.git"
"html/template"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"net/http"
@ -14,8 +14,8 @@ type readData struct {
S Status
Book Book
Txt template.HTML
Next string
Prev string
Next string
Prev string
Back string
}
@ -96,7 +96,7 @@ func readHandler(coll *mgo.Collection) func(http.ResponseWriter, *http.Request)
if file == "" {
it := e.Iterator(epub.EITERATOR_LINEAR)
defer it.Close()
http.Redirect(w, r, base + id + "/" + it.CurrUrl(), 307)
http.Redirect(w, r, base+id+"/"+it.CurrUrl(), 307)
return
}