Guest User

Guest User

  • Tech Writer
  • 98
  • 39.8k

Upload a file using WebApi

Feb 6 2020 11:52 AM
I have a file which is located at "D:\\NCDoc98.docx" and I want to pass that as parameter in a WebAPI
 
[HttpPost]
public async Task UploadFile(string file)
{
//code here to upload directly to my IIS folder
}
 
I saw tutorial using IFormFile which needs I GUI. all want is just to pass the path of the file and it will directly upload the file to the current folder of my asp.net core files..

Answers (1)