1
0

A little var name refactor.

This commit is contained in:
Alexander Andreev 2022-03-07 23:40:41 +04:00
parent f2cd801b05
commit 829000764c
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -146,7 +146,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
return
}
fSha256 := hex.EncodeToString(s256.Sum(nil))
fHash := hex.EncodeToString(s256.Sum(nil))
s256.Write([]byte(h.conf.HashSalt))
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
@ -179,10 +179,10 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
return
}
netTyp, _ := utils.NetworkType(r.Host)
typ, _ := utils.NetworkType(r.Host)
h.logUpload.Printf("| %s | %s | %s | SHA256 %s | %s | %d | %s", r.Header.Get("X-Real-IP"), netTyp,
fHandler.Filename, fSha256, fSaltedHash, fHandler.Size, r.UserAgent())
h.logUpload.Printf("| %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)
} else {