This commit is contained in:
parent
0c5412c069
commit
509ae1968b
2 changed files with 9 additions and 3 deletions
|
@ -7,10 +7,15 @@ My capsule in Gemini space. Built with zord-tree support
|
|||
|
||||
## TODO
|
||||
|
||||
* add image or other file not `gmi` download
|
||||
* main.go:173 add content type by extension
|
||||
* refactor layout
|
||||
* remove capsule title from simple page
|
||||
* security
|
||||
* citata from some file
|
||||
* add pagehint counter in abcex
|
||||
* add gallery categories. index.md with secret to dynamic generators on build
|
||||
__DONE__
|
||||
* add image or other file not `gmi` download
|
||||
* feed
|
||||
* add category view
|
||||
* add tag view
|
||||
|
|
5
main.go
5
main.go
|
@ -7,6 +7,8 @@ import (
|
|||
"google.golang.org/grpc/credentials/insecure"
|
||||
"io"
|
||||
"log"
|
||||
"mime"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
@ -169,8 +171,7 @@ func downloadAttachment(w gemini.ResponseWriter, r *gemini.Request, client TreeM
|
|||
return
|
||||
}
|
||||
|
||||
//w.SetMediaType(http.DetectContentType([]byte(response.Content)))
|
||||
w.SetMediaType("image/png")
|
||||
w.SetMediaType(mime.TypeByExtension(path.Ext(filePath)))
|
||||
for {
|
||||
chunkResponse, err := response.Recv()
|
||||
if err == io.EOF {
|
||||
|
|
Loading…
Reference in a new issue