mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Use humanize constants for KiB, MiB and GiB units. (#3322)
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
|
||||
"encoding/json"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
"github.com/pkg/profile"
|
||||
)
|
||||
|
||||
@@ -112,9 +113,9 @@ func checkValidMD5(md5 string) ([]byte, error) {
|
||||
/// http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html
|
||||
const (
|
||||
// maximum object size per PUT request is 5GiB
|
||||
maxObjectSize = 1024 * 1024 * 1024 * 5
|
||||
// minimum Part size for multipart upload is 5MB
|
||||
minPartSize = 1024 * 1024 * 5
|
||||
maxObjectSize = 5 * humanize.GiByte
|
||||
// minimum Part size for multipart upload is 5MiB
|
||||
minPartSize = 5 * humanize.MiByte
|
||||
// maximum Part ID for multipart upload is 10000 (Acceptable values range from 1 to 10000 inclusive)
|
||||
maxPartID = 10000
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user