- 最新
- 最多得票
- 最多評論
You can limit access to the file only from your website by adding a condition to your S3 bucket policy which would filter against the referer
header in the request. This would allow you to limit your files being access only by a specific domain or subdomains. See here for a sample policy - https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-use-case-4
You can also use signed URLs/cookies to further restrict access based on client and time - https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-choosing-signed-urls-cookies.html
However, you can't really prevent downloads as such. If your users can see your image in their browser, that basically means the image has already been transferred to their device. There are ways to capture and save the image from there (such as developer tools on the browser) regardless of any limitations you try to impose.
相關內容
- 已提問 1 年前
- 已提問 3 個月前
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 8 個月前
- AWS 官方已更新 1 年前