fix: uploaderID is uint64

This commit is contained in:
Derrick Hammer 2024-01-20 06:57:57 -05:00
parent 0ab70dcaa5
commit e8fbe46dfc
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -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)