I have a complex situation involving two networks. On the internal network there is a Web API on a host that is available through an 192.168.. IP address. There is no Internet connection for this host, so anything it has is only within the intrAnet environment.
On a second host there is access to both the Internet and the internal network. Here I have a website that will access some of the API functions. (Not all!) Visitors from outside can thus use the site to do a minimal interaction with the API.
Now, my problem is that the API has a folder with user profile images linked to user ID’s. (Basically a {guid}.jpg file.) The API needs to have a method that will send the image to the client, which isn’t too difficult. Just something like return new FileStreamResult(fileStream, contentType);
in the method. But the browser cannot access this result as the API has no direct access to the Internet. So it needs to pass through the website.
So, how do I make a method in the API and a method in the site so an image can be displayed within the browser?