fix: pass a buffer.Reader copying from Buffer
This commit is contained in:
parent
35aa206687
commit
4f50d645ad
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue