From 2c30477465212177519bb894aecde26003f9064c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 19 Jan 2024 15:52:26 -0500 Subject: [PATCH] refactor: update putfile and gethash call names --- api/s5/http.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/s5/http.go b/api/s5/http.go index abc522d..f756b78 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -138,7 +138,7 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { }(r.Body) } - hash, err := h.portal.Storage().GetHash(rs) + hash, err := h.portal.Storage().GetHashSmall(rs) _, err = rs.Seek(0, io.SeekStart) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError) @@ -173,7 +173,7 @@ func (h *HttpHandler) SmallFileUpload(jc jape.Context) { return } - hash, err = h.portal.Storage().PutFile(rs, "s5", false) + hash, err = h.portal.Storage().PutFileSmall(rs, "s5", false) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError) @@ -758,7 +758,7 @@ func (h *HttpHandler) DirectoryUpload(jc jape.Context) { var rs io.ReadSeeker - hash, err := h.portal.Storage().GetHash(rs) + hash, err := h.portal.Storage().GetHashSmall(rs) _, err = rs.Seek(0, io.SeekStart) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError) @@ -771,7 +771,7 @@ func (h *HttpHandler) DirectoryUpload(jc jape.Context) { continue } - hash, err = h.portal.Storage().PutFile(rs, "s5", false) + hash, err = h.portal.Storage().PutFileSmall(rs, "s5", false) if err != nil { errored(err) @@ -839,7 +839,7 @@ func (h *HttpHandler) DirectoryUpload(jc jape.Context) { var rs = bytes.NewReader(appData) - hash, err := h.portal.Storage().GetHash(rs) + hash, err := h.portal.Storage().GetHashSmall(rs) _, err = rs.Seek(0, io.SeekStart) if err != nil { _ = jc.Error(errUploadingFileErr, http.StatusInternalServerError) @@ -864,7 +864,7 @@ func (h *HttpHandler) DirectoryUpload(jc jape.Context) { return } - hash, err = h.portal.Storage().PutFile(rs, "s5", false) + hash, err = h.portal.Storage().PutFileSmall(rs, "s5", false) if err != nil { errored(err)