1
0

Return an error text message if file handling is turned off.

This commit is contained in:
Alexander Andreev 2023-08-23 04:23:51 +04:00
parent 391f589a90
commit 06961fc7c4
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -50,7 +50,7 @@ func (h *FilesHandlers) Index(w http.ResponseWriter, r *http.Request) {
func (h *FilesHandlers) File(w http.ResponseWriter, r *http.Request) {
if h.noFileHandling {
w.WriteHeader(http.StatusServiceUnavailable)
Error(w, http.StatusServiceUnavailable, "File handling is turned off.", "", r.Referer())
return
}
r.URL.Path = httpr.Param(r, "filepath")