mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-13 05:50:27 +00:00
Fix /text/ for media hyphae
This commit is contained in:
parent
2c8e21e6cf
commit
e577b79d67
@ -151,7 +151,7 @@ func handlerText(w http.ResponseWriter, rq *http.Request) {
|
|||||||
util.PrepareRq(rq)
|
util.PrepareRq(rq)
|
||||||
hyphaName := util.HyphaNameFromRq(rq, "text")
|
hyphaName := util.HyphaNameFromRq(rq, "text")
|
||||||
switch h := hyphae.ByName(hyphaName).(type) {
|
switch h := hyphae.ByName(hyphaName).(type) {
|
||||||
case *hyphae.TextualHypha:
|
case hyphae.ExistingHypha:
|
||||||
log.Println("Serving", h.TextFilePath())
|
log.Println("Serving", h.TextFilePath())
|
||||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||||
http.ServeFile(w, rq, h.TextFilePath())
|
http.ServeFile(w, rq, h.TextFilePath())
|
||||||
|
Loading…
Reference in New Issue
Block a user