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:
Krishna Srinivas
2016-10-22 21:35:01 +05:30
committed by Harshavardhana
parent e51be73ac7
commit 5999a23d3e
6 changed files with 65 additions and 1 deletions

View File

@@ -114,7 +114,7 @@ func extractPostPolicyFormValues(reader *multipart.Reader) (filePart io.Reader,
}
formValues[canonicalFormName] = string(buffer)
} else {
filePart = io.LimitReader(part, maxObjectSize)
filePart = limitReader(part, maxObjectSize)
fileName = part.FileName()
// As described in S3 spec, we expect file to be the last form field
break