fix: wrong hash encoding

This commit is contained in:
Derrick Hammer 2024-01-24 02:00:53 -05:00
parent 5d715fcac4
commit 27cbe2d886
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

@ -619,7 +619,10 @@ func (s *StorageServiceImpl) GetFile(hash []byte) (io.ReadCloser, uint64, error)
return nil, 0, errors.New("file does not exist")
}
hashStr := hex.EncodeToString(hash)
hashStr, err := encoding.NewMultihash(s.getPrefixedHash(hash)).ToBase64Url()
if err != nil {
return nil, 0, err
}
resp, err := s.httpApi.R().
SetPathParam("path", hashStr).