Reputation:
I have a website with the below structure for saving product images:
~/fileserver/{user_id}/{file_id}.{file_extension}
I want to restrict access to each {user_id}
folder and let only the specific user to retrieve that image. How this can be done? Do I have to set something in IIS?
Upvotes: 1
Views: 339
Reputation: 8231
Write an HttpModule that checks the request path. If the path contains fileserver/{user_id}
, and user_id
is a valid user, then check to see if user_id
is authenticated.
Many tutorials on how to do this are available.
Upvotes: 1