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)