1
Answer

Upload a file using WebApi

Guest User

Guest User

5y
467
1
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)