S3下载和GetObject之间有什么区别?

huangapple go评论85阅读模式
英文:

what is the difference between s3 download and getobject

问题

我的问题与aws sdk for golang有关。有两种方法可以下载文件:

  • GetObject
  • Download(S3Manager)

我了解到Download使用并发的GET请求来下载文件。如果是这样的话,这不是一直都是更好的选择吗?如果不是,请指导何时使用GetObject方法。

英文:

My question is with reference to aws sdk for golang. There are two ways to download a file

  • GetObject
  • Download (S3Manager)

I understand that Download uses concurrent GET requests to download a file. If this is the case, is not this always a better option? If not, could you please advise when to use GetObject method?

答案1

得分: 5

GetObject 是一个低级别的 调用 S3 REST API。Downloader 在内部使用它来并发下载请求文件的块。因此,例如,如果您想编写自定义的下载器,使用它是有意义的。作为最终用户,您应该使用 Downloader。

英文:

GetObject is a low-level call to S3 rest API. Downloader it's using it internally for concurrent download of chunks of the requested file. So, for example, it makes sense to use it in case you want to write your custom downloader. As an end user, you should stick with Downloader.

huangapple
  • 本文由 发表于 2017年9月18日 20:16:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/46279091.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定