fix: pass a buffer.Reader copying from Buffer

This commit is contained in:
Derrick Hammer 2024-01-15 08:20:28 -05:00
parent 35aa206687
commit 4f50d645ad
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ func (h *HttpHandlerImpl) SmallFileUpload(jc *jape.Context) {
}(r.Body)
}
hash, err := h.portal.Storage().PutFile(interface{}(buffer).(io.ReadSeeker), "s5", false)
hash, err := h.portal.Storage().PutFile(bytes.NewReader(buffer.Bytes()), "s5", false)
if err != nil {
_ = jc.Error(errUploadingFileErr, http.StatusInternalServerError)