I have a web page that I would like to add a new feature. customers will pay in order to download some video files.
Video files will be stored in amazon S3 (will be about 150GB per year). When a user pays through paypal for example, then a mail will be sent with an amazon s3 url link for the user to download.
but then he/she could pass this video link to other users who haven't paid but can access amazon s3 since the file is public. If the video was in my server I know how I could check 开发者_如何学Goif the user has paid, and server the file.
But now that it will be on an external server how could this be done?
How site delivering paid contact avoid this thing?
thanks
You can make your S3 content private and then create a time-limited pre-signed url to the video - eg the url will no longer work after the expiry time.
Of course the user could still share the link before it has expired, but then the user could also just share the downloaded video anyway.
Well, you have to log, if an user have downloaded the complete file. You have to write some kind of servercode, what will measure, if all the content habe been delivered. Or you can make some kind of key, which is only valid for 24h. After that time it becomes invalid.
精彩评论