1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 05:20:26 +00:00

Fix /text/ for media hyphae

This commit is contained in:
Timur Ismagilov 2022-08-06 12:44:19 +05:00
parent 2c8e21e6cf
commit e577b79d67

View File

@ -151,7 +151,7 @@ func handlerText(w http.ResponseWriter, rq *http.Request) {
util.PrepareRq(rq)
hyphaName := util.HyphaNameFromRq(rq, "text")
switch h := hyphae.ByName(hyphaName).(type) {
case *hyphae.TextualHypha:
case hyphae.ExistingHypha:
log.Println("Serving", h.TextFilePath())
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
http.ServeFile(w, rq, h.TextFilePath())