Reputation: 619
I have a question related to my ASP.net MVC 3 application. My web app allows users to upload files to Amazon S3 and other members to access them. I wish to have control over who can access these file. To do this I dont want to expose the URI's of the files and I would perfer not to have the server proxy the file.
Can someone suggest the best ways to achieve this?
Upvotes: 0
Views: 1158
Reputation: 52073
One way would be to use the AWS SDK for .NET and call the GetPreSignedURL method which will generate a temporary url with querystring authorization. Another option would be to point your images to a secured MVC route which does a 301/302 redirect to the image url (could also be a presigned url).
Upvotes: 1
Reputation: 15361
S3 allows you to create a signed url which has a time expiration. This appears to have been covered completely here: Creating expiring links to S3 or Cloudfront hosted content with ASP .Net
Upvotes: 2