fix: use readSizeV1 wherever applicable. (#2093)

This commit is contained in:
Bala FA 2016-07-05 07:51:15 +05:30 committed by Harshavardhana
parent 4cfbdb1bf0
commit 0540863663
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ import (
)
// maximum supported access policy size.
const maxAccessPolicySize = 20 * 1024 * 1024 // 20KiB.
const maxAccessPolicySize = 20 * 1024 // 20KiB.
// Verify if a given action is valid for the url path based on the
// existing bucket access policy.

View File

@ -295,7 +295,7 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, s
md5Writer := md5.New()
// Allocate 32KiB buffer for staging buffer.
var buf = make([]byte, 128*1024)
var buf = make([]byte, readSizeV1)
for {
n, err := io.ReadFull(data, buf)
if err == io.EOF {

View File

@ -323,7 +323,7 @@ func (fs fsObjects) PutObject(bucket string, object string, size int64, data io.
}
} else {
// Allocate a buffer to Read() the object upload stream.
buf := make([]byte, 32*1024)
buf := make([]byte, readSizeV1)
// Read the buffer till io.EOF and append the read data to
// the temporary file.
for {