javascript - S3 : How to upload a large file using S3 in nodejs using aws-sdk - Stack Overflow

I need to upload large files into S3 using AWS SDK. I see the upload API .html#upload-property does exa

I need to upload large files into S3 using AWS SDK. I see the upload API .html#upload-property does exactly that but the issue is with setting the body. I need to read the whole file upfront and that may not be possible for huge file due to memory constraints

Is there a better way of doing it without reading the file locally?

I need to upload large files into S3 using AWS SDK. I see the upload API https://docs.aws.amazon./AWSJavaScriptSDK/latest/AWS/S3.html#upload-property does exactly that but the issue is with setting the body. I need to read the whole file upfront and that may not be possible for huge file due to memory constraints

Is there a better way of doing it without reading the file locally?

Share Improve this question asked Jul 20, 2019 at 20:40 Jagadish KamathJagadish Kamath 1233 silver badges8 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

It is possible to upload files in chunks rather than a single upload. In fact, AWS remend using Multipart Upload when uploading files that are bigger than 100 MB.

Multipart upload allows you to upload a single object as a set of parts. If transmission of any part fails, you can re-transmit that part without affecting other parts. After all parts of your object are uploaded, Amazon S3 assembles these parts and creates the object.

Follow this official link on AWS to learn more about uploading using multipart:

http://docs.aws.amazon./AmazonS3/latest/dev/uploadobjusingmpu.html

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745385532a4625422.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信