From 73bd74faebc2238ed95bcc5ed0d08ec36b5043cf Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 25 Jan 2024 16:34:31 -0500 Subject: [PATCH] refactor: use storage NewFile --- api/s5/http.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/s5/http.go b/api/s5/http.go index aac35be..4612058 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -19,7 +19,6 @@ import ( "git.lumeweb.com/LumeWeb/portal/db/models" "git.lumeweb.com/LumeWeb/portal/interfaces" "git.lumeweb.com/LumeWeb/portal/protocols" - "git.lumeweb.com/LumeWeb/portal/storage" emailverifier "github.com/AfterShip/email-verifier" "github.com/samber/lo" "github.com/vmihailenco/msgpack/v5" @@ -1304,7 +1303,7 @@ func (h *HttpHandler) DownloadFile(jc jape.Context) { hashBytes = cidDecoded.Hash.HashBytes() } - file := storage.NewFile(hashBytes, h.portal.Storage()) + file := h.portal.Storage().NewFile(hashBytes) if !file.Exists() { jc.ResponseWriter.WriteHeader(http.StatusNotFound)