feat(web): show image preview in file view menu

This commit is contained in:
2023-02-02 00:05:04 +03:00
parent ef373db8d5
commit 8089c6ae68
4 changed files with 35 additions and 5 deletions
+3
View File
@@ -223,6 +223,9 @@ func main() {
r.URL.Path = strings.Join(thumb_path, "/")
http.StripPrefix("/thumbs", tfm_fs).ServeHTTP(w, r)
}))
http.Handle("/preview/", Auth(func(w http.ResponseWriter, r *http.Request) {
http.StripPrefix("/preview", tfm_fs).ServeHTTP(w, r)
}))
log.Println("Running...")
err = server.ListenAndServeTLS("/etc/ssl/certs/web-global.crt", "/etc/ssl/private/web-global.key")
if errors.Is(err, http.ErrServerClosed) {