refactor: update putfile and gethash call names

This commit is contained in:
Derrick Hammer 2024-01-19 15:52:26 -05:00
parent 6acf8a606a
commit 2c30477465
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 6 deletions

View File

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