forked from TrueCloudLab/frostfs-http-gw
[#148] Add custom multipart reader
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
8ced5f40e8
commit
562c7e994c
3 changed files with 586 additions and 1 deletions
|
@ -2,8 +2,8 @@ package uploader
|
|||
|
||||
import (
|
||||
"io"
|
||||
"mime/multipart"
|
||||
|
||||
"github.com/nspcc-dev/neofs-http-gw/uploader/multipart"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
@ -15,6 +15,8 @@ type MultipartFile interface {
|
|||
}
|
||||
|
||||
func fetchMultipartFile(l *zap.Logger, r io.Reader, boundary string) (MultipartFile, error) {
|
||||
// To have a custom buffer (3mb) the custom multipart reader is used.
|
||||
// https://github.com/nspcc-dev/neofs-http-gw/issues/148
|
||||
reader := multipart.NewReader(r, boundary)
|
||||
|
||||
for {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue