mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
content-length-range policy should be honored for the uploaded object sizes. (#3076)
This commit is contained in:
committed by
Harshavardhana
parent
3977d6b7bd
commit
35e541e0b1
@@ -81,6 +81,13 @@ func toObjectErr(err error, params ...string) error {
|
||||
Object: params[1],
|
||||
}
|
||||
}
|
||||
case errDataTooSmall:
|
||||
if len(params) >= 2 {
|
||||
err = ObjectTooSmall{
|
||||
Bucket: params[0],
|
||||
Object: params[1],
|
||||
}
|
||||
}
|
||||
case errXLReadQuorum:
|
||||
err = InsufficientReadQuorum{}
|
||||
case errXLWriteQuorum:
|
||||
@@ -266,6 +273,13 @@ func (e ObjectTooLarge) Error() string {
|
||||
return "size of the object greater than what is allowed(5G)"
|
||||
}
|
||||
|
||||
// ObjectTooSmall error returned when the size of the object < what is expected.
|
||||
type ObjectTooSmall GenericError
|
||||
|
||||
func (e ObjectTooSmall) Error() string {
|
||||
return "size of the object less than what is expected"
|
||||
}
|
||||
|
||||
/// Multipart related errors.
|
||||
|
||||
// MalformedUploadID malformed upload id.
|
||||
|
||||
Reference in New Issue
Block a user