[英]How to use CloudFront distribution to upload files to backing S3 storage?
I have a Cloudfront distribution backed by S3 storage.我有一个由 S3 存储支持的 Cloudfront 发行版。 CloudFront supports POST content-uploads as mentioned here: https://aws.amazon.com/blogs/aws/amazon-cloudfront-content-uploads-post-put-other-methods/
CloudFront 支持 POST 内容上传,如下所述: https://aws.amazon.com/blogs/aws/amazon-cloudfront-content-uploads-post-put-other-methods/
Couple of issues using this -使用这个的几个问题 -
Please note that, am trying to create a mobile application, that uses the above config as its backend.请注意,我正在尝试创建一个使用上述配置作为其后端的移动应用程序。 So, users on the mobile app are already authenticated using OAuth with Google/Facebook etc providers.
因此,移动应用程序上的用户已经使用 OAuth 与 Google/Facebook 等提供商进行了身份验证。
Check the bucket's policy.检查存储桶的策略。 You must allow
PutObject
.您必须允许
PutObject
。
That's not really related to CloudFront or S3.这与 CloudFront 或 S3 并没有真正的关系。 Before the action of POST-ing the content, you need to validate that the user is properly authenticated and authorized to do such action.
在发布内容之前,您需要验证用户是否经过适当的身份验证并获得执行此类操作的授权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.