Hi,
Is it possible to get access to the local path of file in file upload control?
E.g. I have a file C:\DummyData\Hello.txt
ASP.NET Project is stored here C:\Project\FileUploadTest which has a default.aspx page containing file upload control say fileUpload1.
In code behind, I use
string filename = Path.GetFullPath(fileUpload1.PostedFile.FileName);
but this gives me filename as
C:\\Program Files\\Common Files\\Microsoft Shared\\DevServer\\10.0\\Hello.txt
Is there a way I can capture C:\DummyData\Hello.txt?
I can assume that because of security reason, the browsers cannot show the actual path and hence shows fakepath.. But can't this be accessed in code behind?
Basically, I do not want to bring the file to the server. Once I get hold of the client file path, will move the file to a different machine (say machine B) using File.Move ...
Go to the complete details ...