<input type=‘file’> for IE gives full path, need file name only

Solution 1:

There is also an IE option under:

  • Internet Options
  • Security tab
  • In "Internet" or "Intranet" click on Custom Level
  • In the Security Settings scroll down until you see “Include local directory path when uploading files to a server” and disable it.
  • Click OK on Internet Options window and refresh.

Solution 2:

Try this at the server side:

Path.GetFileName(file.FileName)