4
How to send and return images from a Web Api
from the Controller
of an application Asp.net MVC
?
In my Controller
of the project Asp.net MVC
I get from View
a picture like HttpPostedFileBase
and need to send to Web Api
using PostAsJsonAsync
. Ex.:
var response = await client.PostAsJsonAsync("api/image", image);
Note: I need to save in the database only the image path and its name, the file must be saved in a folder on the server.
Thank you.