How to load image file from physical path with out create virtual directory?
I use C# code behaind and image source is physical path?
How tio convert
C:\Folder\imageName.jpg
to
file:///C:/Folder/imageName.jpg
How to load image file from physical path with out create virtual directory? I
Share
You need to use a controller action to serve that image:
and in your view invoke this controller action to show the image:
The reason for this is because client browsers cannot access arbitrary files located on the server. If this image is not inside the virtual directory it cannot be referenced by a client. So it is the server that needs to expose it.