diff --git a/internal/http/handlers.go b/internal/http/handlers.go index c7401e4..455b310 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -135,7 +135,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) { typ, _ := utils.NetworkType(r.Host) - h.logFile.Printf("up | %s | %s | %s | SHA256 %s | %s | %d | %s", r.Header.Get("X-Real-IP"), typ, + h.logFile.Printf("| up | %s | %s | %s | SHA256 %s | %s | %d | %s", r.Header.Get("X-Real-IP"), typ, fHandler.Filename, fHash, fSaltedHash, fHandler.Size, r.UserAgent()) w.WriteHeader(http.StatusCreated) @@ -187,7 +187,7 @@ func (h *UploadHandlers) Download(w http.ResponseWriter, r *http.Request) { netTyp, _ := utils.NetworkType(r.Host) - h.logFile.Printf("dw | %s | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, name, saltedHash, r.UserAgent()) + h.logFile.Printf("| dw | %s | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, name, saltedHash, r.UserAgent()) http.ServeContent(w, r, path, stat.ModTime(), fd) } @@ -218,7 +218,7 @@ func (h *UploadHandlers) Delete(w http.ResponseWriter, r *http.Request) { netTyp, _ := utils.NetworkType(r.Host) - h.logFile.Printf("dt | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, saltedHash, r.UserAgent()) + h.logFile.Printf("| dt | %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, saltedHash, r.UserAgent()) w.WriteHeader(http.StatusNoContent) if strings.Contains(r.UserAgent(), "curl") || strings.Contains(r.UserAgent(), "Wget") {