简体   繁体   English

仅适用于特殊用户的AWS S3文件

[英]AWS S3 file only for special user

I would like to upload images from users and upload to S3. 我想从用户上传图像并上传到S3。 The problem is, that the images should only be display from the user itself and not invoke by other people who know the url. 问题是,这些图像应该只从用户本身的显示,而不是由谁知道网址别人调用。

I think it is possible to return the image from a url in my application an check the session data if the user is valid. 我认为这是可能从URL返回图像中我的应用程序的检查会话数据,如果用户是有效的。 Maybe http://img.domain.com/31hh21ej12he/ 也许http://img.domain.com/31hh21ej12he/

But is there a way in S3 to do this? 但是S3中有没有办法做到这一点?

You can generate pre-signed URLs, they will be much harder to "guess" or share and expire after a while. 您可以生成预签名的URL,它们将很难“猜测”或共享并在一段时间后过期。 See: http://docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURLJavaSDK.html 请参阅: http : //docs.aws.amazon.com/AmazonS3/latest/dev/ShareObjectPreSignedURLJavaSDK.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM