Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading a file less than 5MB through using multipart upload api to AWS S3 bucket

Tags:

amazon-s3

As per the Amazon multipart upload documentation the Each part must be at least 5 MB in size, except the last part. http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPart.html

Question is how do I upload a file less than 5MB through multipart upload api to AWS S3 bucket. The reason I am asking this that I want to use multipart upload API for all files when uploading to S3

like image 929
user1788294 Avatar asked Jul 19 '14 10:07

user1788294


1 Answers

You can still upload it using multipart upload, the same as you would a larger file... but you have to upload it with only one part.

The rule enforced by S3 is that all parts except the last part must be >= 5MB. If the first part is also the last part, this rule isn't violated and S3 accepts the small file as a multipart upload.

like image 132
Michael - sqlbot Avatar answered Nov 16 '22 06:11

Michael - sqlbot