0

I have developed an ASP.NET Core Web API application. In that application, i upload files through postman and save those files in a particular path.

I tried to get file path of uploaded file through postman but not able to get it. Please suggest me a solution to get file path of uploaded file through postman. Any help is appreciated.

public IActionResult UploadPackage([FromForm]List<IFormFile> postedFiles)
{

}

In the postedFiles parameter, i am not able to get file path.

  • The name that's send with the FormFile isn't garantueed to contain the full path or even the filename for all that matters. As example the implementation of IE sends the full path, while most other browsers only send the filename. So in short; you should not depend on receiving the full path from the IFormFile. – NotFound Sep 15 '20 at 11:45
  • https://stackoverflow.com/a/8660740/2716623 – vasily.sib Sep 15 '20 at 11:46
  • The browser will not send the full file path, it only send the filename. take a look at this [thread](https://stackoverflow.com/a/1130801/11965297) – mj1313 Sep 16 '20 at 06:34

0 Answers0