用于将文件上传到S3的upload()和putObject()之间的区别? [英] Difference between upload() and putObject() for uploading a file to S3?

查看:537
本文介绍了用于将文件上传到S3的upload()和putObject()之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在aws-sdk的S3类中, upload() putObject() ?他们似乎做同样的事情.为什么我会更喜欢一个?

In the aws-sdk's S3 class, what is the difference between upload() and putObject()? They seem to do the same thing. Why might I prefer one over the other?

推荐答案

使用AWS开发工具包 putObject() 参数如下:

The difference between using AWS SDK upload() and putObject() param is as below:

  • 如果上传完成时报告的MD5不匹配,则它 重试.
  • 如果文件足够大,它将使用分段上传进行上传 平行零件.
  • 根据客户端的重试设置重试.
  • 您可以用于进度报告.
  • 如果不提供,则基于文件扩展名设置ContentType 它.
  • If the reported MD5 upon upload completion does not match, it retries.
  • If the file size is large enough, it uses multipart upload to upload parts in parallel.
  • Retry based on the client's retry settings.
  • You can use for Progress reporting.
  • Sets the ContentType based on file extension if you do not provide it.

这篇关于用于将文件上传到S3的upload()和putObject()之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆