0

In our web aplication several pages have attachemnts. Some attachments are available for public users and some are secured to registered users. Now we don't have enough infrastructure to host all the attachment files on our server and planning to use cloud storage for this purpose.

The Problem: Though unsecured content can be served directly with a url, I am not able to get an idea on how to serve secured content from cloud. Please see the below use case that describes my problem.

A file is hosted on cloud with an url https://xyz.com/file01. This should be accessible only to a logged in user. The user credentials are validated in my application. So, if another user hits the same url, the file should not be available for download for that user.

I am looking at some enterprise cloud storage solutions.

Thanks.

1 Answer 1

1

You could use a cloud storage service that has an API that allows you to generate authenticated URLs, such as Amazon S3.

To do this, set your S3 bucket is private by default, and your web app uses the S3 API to hand out authenticated URLs users that are allowed access to certain files. Much like password reset links, these links would be one-time use or could expire after a given time.

More information: Using a CDN like Amazon S3 to control access to media

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .