纯JavaScript应用程序+ Amazon S3吗?应用程序、JavaScript、Amazon

2023-09-10 16:40:33 作者:平凡グ之路

我在寻找证实或反驳如下:

I'm looking to confirm or refute the following:

有关我读到目前为止,这是不可能的编写一个Web应用程序只用JavaScript的 - 没有服务器端逻辑 - 来自Amazon S3还存储数据只到S3,如果你需要有多个客户提供私人服务每个客户端的数据。

For what I have read so far it is not possible to write a web application with only javascript -- no server side logic -- served from Amazon S3 that also store data only to S3 if you need to have multiple clients with private data per client.

我看到的问题是需要每一个Ajax调用,这将迫使我把签名(和我的AWS ID)正确的,在网页源有目共睹的Authorization头。

The issue I see is the Authorization header required for every Ajax call that would force me to put the signature (and my AWS id) right there in the page source for everybody to see.

是正确的还是我误解的文档?

Is that correct or I misunderstood the docs?

是否有变通方法?

推荐答案

总之,你是正确的。

如果您的AWS键结束,在对客户端没有办法,你有麻烦了。

If your AWS key ends-up in any way on the client-side, you are in trouble.

一个可能的解决方案,当然,让用户指定的的 AWS密钥存储其数据。

A possible solution is, of course, to have the user specify their AWS key for storing their data.