Procházet zdrojové kódy

Disable file preview page

kiska-2021
JustAnotherArchivist před 3 roky
rodič
revize
ab7a007ed2
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. +1
    -0
      server/server.go

+ 1
- 0
server/server.go Zobrazit soubor

@@ -407,6 +407,7 @@ func (s *Server) Run() {
r.HandleFunc("/{action:(?:download|get|inline)}/{token}/{filename}", s.headHandler).Methods("HEAD") r.HandleFunc("/{action:(?:download|get|inline)}/{token}/{filename}", s.headHandler).Methods("HEAD")


r.HandleFunc("/{token}/{filename}", s.previewHandler).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) (match bool) { r.HandleFunc("/{token}/{filename}", s.previewHandler).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) (match bool) {
return false
match = false match = false


// The file will show a preview page when opening the link in browser directly or // The file will show a preview page when opening the link in browser directly or


Načítá se…
Zrušit
Uložit