I'm trying to upload a file to my S3 bucket using multipart upload. I'm following the exact same code as found here. The problem is, whenever it reaches the last part of my file, I get a EntityTooSmall: Your proposed upload is smaller than the minimum allowed size
error.
Issue: S3's multipart upload restricts file part sizes to a minimum of 5 MB
Solution: S3 allows the last part to be less than 5 MB large
Issue: This is my last part. And it's not being recognized. Is there anything I'm missing?
Thanks to @icza's pointers, the code I've mentioned above is not quite complete. The error I was receiving had nothing to do with the last bit. Apparently, it's part of the completeMultiPartUpload
function. That's where the error is being thrown.
Details: The uploadPart
is taking my data, whatever my chunk size is, and storing it in a pool of some sort. The error is being thrown at the maxPartSize
, being too small. Changing that to anything greater than 5 MB solved the issue.