I am facing an issue when showing uploaded image in browser. I get error
Not allowed to load local resource: file:///C:/Office%20Data/dummy/AngularJSAuthentication-master/MyCars/MyCar.API/App_Data/Images/p7.jpeg%20alt=
I wrote the following line of code to store image on server under App_data.
File.Path = Url.Content(string.Format("{0}/{1}", System.Web.HttpContext.Current.Server.MapPath("~/App_Data/Images"), fileName));
File path saved in DB as following
file:///C:/Sample%20Data/dummy/AngularJSAuthentication-master/MyCars/MyCar.API/App_Data/Images/p7.jpeg
HTML
<img ng-src="{{motor.FileUploads[0].Path}} alt="Description" />
After googling i got the reason for this error.
Basically i need to return back Image URL instead of file path.
Problem: I am not sure how i can return image path back to angular client.
Can someone guide me on it.