如何通过CloudFront将对象放到S3 [英] How to put object to S3 via CloudFront

查看:588
本文介绍了如何通过CloudFront将对象放到S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过CloudFront将图片上传到S3。
如果您看到有关CloudFront的文档,您可以发现云前端提供put方法上传到cloudFront
可能有人问我为什么我使用云前端上传到S3
如果你搜索一下,你可以找到解决方案

I'd like to upload image to S3 via CloudFront. If you see the document about CloudFront, you can find that cloud front offers put method for uploading to cloudFront There could be someone to ask me why i use the cloud front for uploading to S3 If you search out about that, you can find the solution

我想问的是SDK中是否有方法可以上传到云端或者不是
As你知道,有一个方法putObejct直接上传到S3,但我找不到上传云端...

What i wanna ask is whether there is method in SDK for uploading to cloud front or not As you know , there is method "putObejct" for uploading directly to S3 but i can't find for uploading cloud front ...

请帮助我..

推荐答案

可以通过Amazon CloudFront将数据发送到后端origin。这用于在Web表单上使用POST,将信息发送回Web服务器。它还可用于将数据发布到Amazon S3

Data can be sent through Amazon CloudFront to the back-end "origin". This is used for using a POST on web forms, to send information back to web servers. It can also be used to POST data to Amazon S3.

如果您更愿意使用SDK将数据上传到Amazon S3,那么通过CloudFront发送数据没有任何好处。相反,使用Amazon S3 API将数据直接上传到S3。

If you would rather use an SDK to upload data to Amazon S3, there is no benefit in sending it "via CloudFront". Instead, use the Amazon S3 APIs to upload the data directly to S3.

所以,底线:


  • 如果您从最初通过CloudFront提供的网页上传,通过CloudFront将其发送到S3

  • 如果您'重新调用API,直接调用S3

  • If you're uploading from a web page that was initially served via CloudFront, send it through CloudFront to S3
  • If you're calling an API, call S3 directly

这篇关于如何通过CloudFront将对象放到S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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