admin管理员组文章数量:1423156
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 badges1 Answer
Reset to default 3It 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
本文标签: javascriptS3How to upload a large file using S3 in nodejs using awssdkStack Overflow
版权声明:本文标题:javascript - S3 : How to upload a large file using S3 in nodejs using aws-sdk - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745385531a2656358.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论