I need to upload a file to server from a wpf application, the file path would be same always, so it would be simple if web api expected file path only.
But the web api method looks like this:
// POST api/values
[HttpPost]
public IActionResult UploadFile(IFormFile file)
{
// Upload logic goes here.
}
So I am not sure how to create an object of type IFormFile from the file path which I have.
Note: IFormFile interface is there in Microsoft.AspNet.Http namespace.