refactor: use storage NewFile

This commit is contained in:
Derrick Hammer 2024-01-25 16:34:31 -05:00
parent d21044baed
commit 73bd74faeb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -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)