From 4f50d645adff432eb04281bdb28196276d92d63a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 15 Jan 2024 08:20:28 -0500 Subject: [PATCH] fix: pass a buffer.Reader copying from Buffer --- protocols/s5/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/s5/http.go b/protocols/s5/http.go index 577fea8..77ff107 100644 --- a/protocols/s5/http.go +++ b/protocols/s5/http.go @@ -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)