Make CacheID global

This commit is contained in:
2022-10-11 14:42:24 +02:00
parent 14df7e8a70
commit 547d50a6bc
15 changed files with 36 additions and 35 deletions

View File

@@ -2,7 +2,6 @@ package webcontroller
import (
"io"
"io/ioutil"
"net/http"
"strings"
@@ -44,7 +43,7 @@ func (wc *WebController) serveFilePreview(w http.ResponseWriter, r *http.Request
}
defer body.Close()
bodyBytes, err := ioutil.ReadAll(body)
bodyBytes, err := io.ReadAll(body)
if err != nil {
log.Error("Can't read text file for preview: %s", err)
w.Write([]byte("An error occurred while reading this file."))