简体   繁体   中英

Maximum File Upload Size in Java

i'm trying to upload a file to s3. the issue is i don't know the exact size of the file it can be 1gb or 500mb zip file.

also, if i upload the file it will be in tomcat/temp location as temp file and i will unzip that file and upload to s3 using core java, What is the recommended file size that we can keep our file in tomcat/temp location in ec2-instance and will it create any problem?

If you are using the AWS SDK for Java, then the maximum is 5 TB per object (in an HTTP PUT request).

"Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 terabytes."

Reference: https://aws.amazon.com/s3/faqs/

Example Java code with AWS SDK: https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html

Furthermore, the maximum file upload size to AWS S3 is 160 GB if you are not using AWS CLI or AWS SDK.

"You can upload any file type—images, backups, data, movies, etc.—into an S3 bucket. The maximum size of a file that you can upload by using the Amazon S3 console is 160 GB. To upload a file larger than 160 GB, use the AWS CLI, AWS SDK, or Amazon S3 REST API."

Reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM