mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
When object whose size is greater than 5G is uploaded using presigned POST we should return error. (#3033)
fixes #2961
This commit is contained in:
committed by
Harshavardhana
parent
e51be73ac7
commit
5999a23d3e
@@ -74,6 +74,13 @@ func toObjectErr(err error, params ...string) error {
|
||||
Object: params[1],
|
||||
}
|
||||
}
|
||||
case errDataTooLarge:
|
||||
if len(params) >= 2 {
|
||||
err = ObjectTooLarge{
|
||||
Bucket: params[0],
|
||||
Object: params[1],
|
||||
}
|
||||
}
|
||||
case errXLReadQuorum:
|
||||
err = InsufficientReadQuorum{}
|
||||
case errXLWriteQuorum:
|
||||
@@ -252,6 +259,13 @@ func (e InvalidRange) Error() string {
|
||||
return fmt.Sprintf("The requested range \"bytes %d-%d/%d\" is not satisfiable.", e.offsetBegin, e.offsetEnd, e.resourceSize)
|
||||
}
|
||||
|
||||
// ObjectTooLarge error returned when the size of the object > max object size allowed (5G) per request.
|
||||
type ObjectTooLarge GenericError
|
||||
|
||||
func (e ObjectTooLarge) Error() string {
|
||||
return "size of the object greater than what is allowed(5G)"
|
||||
}
|
||||
|
||||
/// Multipart related errors.
|
||||
|
||||
// MalformedUploadID malformed upload id.
|
||||
|
||||
Reference in New Issue
Block a user