Change CreateObject() to take size argument from content-length

This commit is contained in:
Harshavardhana
2015-05-03 23:16:10 -07:00
parent c342ce1588
commit f7caef2d26
7 changed files with 65 additions and 49 deletions

View File

@@ -92,9 +92,8 @@ type ObjectExists GenericObjectError
// EntityTooLarge - object size exceeds maximum limit
type EntityTooLarge struct {
GenericObjectError
Size string
TotalSize string
MaxSize string
Size string
MaxSize string
}
// ObjectNameInvalid - object name provided is invalid
@@ -170,7 +169,7 @@ func (e ObjectNameInvalid) Error() string {
// Return string an error formatted as the given text
func (e EntityTooLarge) Error() string {
return e.Bucket + "#" + e.Object + "with " + e.Size + "reached maximum allowed size limit " + e.TotalSize
return e.Bucket + "#" + e.Object + "with " + e.Size + "reached maximum allowed size limit " + e.MaxSize
}
// Return string an error formatted as the given text