From 897fec75ad012aa8af63d605f14d05b9b2dc6f3f Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 17 Jan 2024 11:31:48 -0500 Subject: [PATCH] fix: update use of CIDFromHash --- api/s5/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/s5/http.go b/api/s5/http.go index 8c0950b..a2d763e 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -132,7 +132,7 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { } if exists, upload := h.portal.Storage().FileExists(hash); exists { - cid, err := encoding.CIDFromHash(hash, upload.Size, types.CIDTypeRaw) + cid, err := encoding.CIDFromHash(hash, upload.Size, types.CIDTypeRaw, types.HashTypeBlake3) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError) h.portal.Logger().Error(errUploadingFile, zap.Error(err)) @@ -156,7 +156,7 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { return } - cid, err := encoding.CIDFromHash(hash, uint64(bufferSize), types.CIDTypeRaw) + cid, err := encoding.CIDFromHash(hash, uint64(bufferSize), types.CIDTypeRaw, types.HashTypeBlake3) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError)