I have a mobile app with talks to backed api implemented in asp.net web api. User can post pictures from app, which I am saving in my content directory. Now user can also request the same url from app and its served to user directly from IIS.
What i want to make sure is only user who uploaded the picture should be able to fetch it. Any other user should receive 404.
Is there a way I can handle this using web api? I dont want to read file in controller and serve as base64 because this is not efficient way. I want to continue serve picture from content directory via IIS and apply authorization on top of it.
has anyone came across this problem?