A little var name refactor.
This commit is contained in:
parent
f2cd801b05
commit
829000764c
@ -146,7 +146,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fSha256 := hex.EncodeToString(s256.Sum(nil))
|
fHash := hex.EncodeToString(s256.Sum(nil))
|
||||||
s256.Write([]byte(h.conf.HashSalt))
|
s256.Write([]byte(h.conf.HashSalt))
|
||||||
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
|
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
|
||||||
|
|
||||||
@ -179,10 +179,10 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
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,
|
h.logUpload.Printf("| %s | %s | %s | SHA256 %s | %s | %d | %s", r.Header.Get("X-Real-IP"), typ,
|
||||||
fHandler.Filename, fSha256, fSaltedHash, fHandler.Size, r.UserAgent())
|
fHandler.Filename, fHash, fSaltedHash, fHandler.Size, r.UserAgent())
|
||||||
|
|
||||||
w.WriteHeader(http.StatusCreated)
|
w.WriteHeader(http.StatusCreated)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user