是否可以使用 POST 直接从 URL 上传到 S3? [英] Is it possible to upload to S3 directly from URL using POST?
问题描述
我知道有一种方法可以使用 POST 直接从 Web 浏览器上传到 S3,而无需将文件发送到您的后端服务器.但是有没有办法从 URL 而不是网络浏览器做到这一点.
I know there is a way to upload to S3 directly from the web browser using POST without the files going to your backend server. But is there a way to do it from URL instead of web browser.
例如,使用 post 将位于 http://example.com/dude.jpg 的文件直接上传到 S3.我的意思是我不想将资产下载到我的服务器然后将其上传到 S3.我只想向 S3 发出 POST 请求,然后它会自动上传.
Example, upload a file that resides at http://example.com/dude.jpg directly to S3 using post. I mean I don't want to download the asset to my server then upload it to S3. I just want to make a POST request to S3 and it uploads it automatically.
推荐答案
我发现这篇文章有一些细节.您可能需要以某种方式修改存储桶的安全设置以允许此类交互.
I found this article with some details. You will probably have to modify your buckets' security settings in some fashion to allow this type of interaction.
http://aws.amazon.com/articles/1434
客户端也会存在一些安全问题,因为您永远不想公开访问您的密钥
There will be some security issues on the client as well since you never want your keys publicly accessible
这篇关于是否可以使用 POST 直接从 URL 上传到 S3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!