ASP.NET Upload Control

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi all

I am using the asp.net upload control to help in uploading files to a ftp folder. When I call the following:
Code:
System.IO.Path.GetFullPath(FileUpload1.FileName)
on the control (FileUpload1) I get the following result: "C:\WINDOWS\system32\img1.JPG". My problem is that the file that I browsed to is not at this location, but instead at "C\img1.JPG".

Can anyone suggest why I am getting a different file location?

Mike55.
 
I have changed the cmd from:
Code:
System.IO.Path.GetFullPath(FileUpload1.FileName)
to:
Code:
System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName)
[code]

and it appears to work correctly.  Any comments?

Mike55.
 
Back
Top