Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all

 

I am using the asp.net upload control to help in uploading files to a ftp folder. When I call the following:

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.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

I have changed the cmd from:

System.IO.Path.GetFullPath(FileUpload1.FileName)

to:

System.IO.Path.GetFullPath(FileUpload1.PostedFile.FileName)

[code]

 

and it appears to work correctly. Any comments?

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...