do a proper redirect if a file cannot be served up
This commit is contained in:
parent
a00b7a1b2d
commit
fae0940f3a
|
@ -66,7 +66,7 @@
|
|||
(defn get-file [path]
|
||||
(if-let [file (files/get-file path (auth/logged-in?))]
|
||||
(resp/content-type (:content_type file) (:data file))
|
||||
(resp/status 404 nil)))
|
||||
(resp/redirect "/notfound")))
|
||||
|
||||
(defroutes files-routes
|
||||
(restricted GET "/listfiles" [] (list-files "/"))
|
||||
|
|
Reference in a new issue