Merge pull request #14 from BBaoVanC/fix-linx-randomize-put

Don't randomize filename if Linx-Randomize is not "yes"

This code is so stable and life's been a mess, but it's time to clear up some old pulls.  Looks good.
This commit is contained in:
ZizzyDizzyMC 2024-05-18 20:24:13 -04:00 committed by GitHub
commit 16b5111d17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,6 +229,8 @@ func uploadRemote(c web.C, w http.ResponseWriter, r *http.Request) {
func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) {
if r.Header.Get("Linx-Randomize") == "yes" {
upReq.randomBarename = true
} else {
upReq.randomBarename = false
}
upReq.deleteKey = r.Header.Get("Linx-Delete-Key")
upReq.accessKey = r.Header.Get(accessKeyHeaderName)