forked from TrueCloudLab/frostfs-http-gw
parent
adb95642d4
commit
1f702ad2d8
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ type MultipartFile interface {
|
||||||
|
|
||||||
func fetchMultipartFile(l *zap.Logger, r io.Reader, boundary string) (MultipartFile, error) {
|
func fetchMultipartFile(l *zap.Logger, r io.Reader, boundary string) (MultipartFile, error) {
|
||||||
// To have a custom buffer (3mb) the custom multipart reader is used.
|
// To have a custom buffer (3mb) the custom multipart reader is used.
|
||||||
// https://github.com/nspcc-dev/neofs-http-gw/issues/148
|
// Default reader uses 4KiB chunks, which slow down upload speed up to 400%
|
||||||
|
// https://github.com/golang/go/blob/91b9915d3f6f8cd2e9e9fda63f67772803adfa03/src/mime/multipart/multipart.go#L32
|
||||||
reader := multipart.NewReader(r, boundary)
|
reader := multipart.NewReader(r, boundary)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|
Loading…
Reference in a new issue