diff --git a/lib/trantor.go b/lib/trantor.go index f44a235..2d7b3d0 100644 --- a/lib/trantor.go +++ b/lib/trantor.go @@ -117,7 +117,7 @@ func downloadHandler(h handler) { headers := h.w.Header() headers["Content-Type"] = []string{"application/epub+zip"} - headers["Content-Disposition"] = []string{"attachment; filename=\"" + book.Title + ".epub\""} + headers["Content-Disposition"] = []string{fmt.Sprintf("attachment; filename=\"%s - %s.epub\"", strings.Join(book.Authors, ", "), book.Title)} headers["Content-Length"] = []string{fmt.Sprint(book.FileSize)} headers["Last-Modified"] = []string{fmt.Sprint(book.UploadDate.Format(time.RFC1123))} addCacheControlHeader(h.w, false)