diff --git a/api/s5/http.go b/api/s5/http.go index 14a66c8..0341ca0 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -1299,9 +1299,10 @@ func (h *HttpHandler) DownloadFile(jc jape.Context) { } hashBytes = hashDecoded.HashBytes() - } + } else { - hashBytes = cidDecoded.Hash.HashBytes() + hashBytes = cidDecoded.Hash.HashBytes() + } file := storage.NewFile(hashBytes, h.portal.Storage())