From ab7a007ed2c769d568fcb77611373e5bc6fa7585 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 8 Feb 2021 01:05:32 +0000 Subject: [PATCH] Disable file preview page --- server/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/server.go b/server/server.go index bff1ee9..ed36853 100644 --- a/server/server.go +++ b/server/server.go @@ -407,6 +407,7 @@ func (s *Server) Run() { 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) { + return false match = false // The file will show a preview page when opening the link in browser directly or