From e8fbe46dfc2f378a2039caabf04aa84c2b1080d9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 20 Jan 2024 06:57:57 -0500 Subject: [PATCH] fix: uploaderID is uint64 --- storage/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/storage.go b/storage/storage.go index 62a0929..1426bce 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -324,7 +324,7 @@ func (s *StorageServiceImpl) tusWorker() { continue } - uploaderID, ok := info.Context.Value(middleware.S5AuthUserIDKey).(uint) + uploaderID, ok := info.Context.Value(middleware.S5AuthUserIDKey).(uint64) if !ok { errorResponse.Body = "Missing user id in context" info.Upload.StopUpload(errorResponse) @@ -343,7 +343,7 @@ func (s *StorageServiceImpl) tusWorker() { continue } - _, err = s.CreateTusUpload(decodedHash.HashBytes(), info.Upload.ID, uploaderID, uploaderIP, info.Context.Value("protocol").(string)) + _, err = s.CreateTusUpload(decodedHash.HashBytes(), info.Upload.ID, uint(uploaderID), uploaderIP, info.Context.Value("protocol").(string)) if err != nil { errorResponse.Body = "Could not create tus upload" info.Upload.StopUpload(errorResponse)