multipart: reject part upload if size is less than 5MB. (#1518)

This commit is contained in:
Krishna Srinivas
2016-05-09 00:36:05 +05:30
committed by Harshavardhana
parent 88e1c04259
commit 75320f70d0
6 changed files with 39 additions and 7 deletions

View File

@@ -233,3 +233,19 @@ type InvalidPart struct{}
func (e InvalidPart) Error() string {
return "One or more of the specified parts could not be found"
}
// InvalidPartOrder parts are not ordered as Requested
type InvalidPartOrder struct {
UploadID string
}
func (e InvalidPartOrder) Error() string {
return "Invalid part order sent for " + e.UploadID
}
// PartTooSmall - error if part size is less than 5MB.
type PartTooSmall struct{}
func (e PartTooSmall) Error() string {
return "Part size should be atleast 5MB"
}