From a41cdbf52cee17c5651a1e8d6ac6d98ce4f49a6d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 17 Jan 2024 09:05:39 -0500 Subject: [PATCH] fix: use the userid context key --- api/s5/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/s5/http.go b/api/s5/http.go index cf84526..09d6d9b 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -170,7 +170,7 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { Hash: hex.EncodeToString(hash), Size: uint64(bufferSize), Protocol: "s5", - UserID: 0, + UserID: uint(jc.Request.Context().Value(AuthUserIDKey).(uint64)), }) if tx.Error != nil {