diff --git a/router/upload.go b/router/upload.go index 48437e40..ecfe1737 100644 --- a/router/upload.go +++ b/router/upload.go @@ -95,7 +95,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error { f.Name = util.TrimWhitespaces(f.Name) f.Description = p.Sanitize(util.TrimWhitespaces(f.Description)) f.Magnet = util.TrimWhitespaces(f.Magnet) - cache.Impl.ClearAll() + cache.Clear() catsSplit := strings.Split(f.Category, "_") // need this to prevent out of index panics @@ -189,7 +189,7 @@ func (f *UploadForm) ExtractInfo(r *http.Request) error { } hash16 := make([]byte, hex.EncodedLen(len(data))) hex.Encode(hash16, data) - f.Infohash = string(hash16) + f.Infohash = strings.ToUpper(string(hash16)) } f.Filesize = 0 diff --git a/service/api/api.go b/service/api/api.go index 417f3242..268ee80c 100644 --- a/service/api/api.go +++ b/service/api/api.go @@ -125,7 +125,7 @@ func validateHash(r *TorrentRequest) (error, int) { } hash16 := make([]byte, hex.EncodedLen(len(data))) hex.Encode(hash16, data) - r.Hash = string(hash16) + r.Hash = strings.ToUpper(string(hash16)) } return nil, http.StatusOK }