Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open File Dialogue for FTP location

Tags:

c#

ftp

I have an issue with open file dialogue when the user browse into an ftp location. The path i get from the openFileDialogue is a local path (Local Setting temp folder) instead of the actual ftp path I selected. How to get the actual ftp path.

like image 475
Fennie Avatar asked Nov 06 '22 16:11

Fennie


1 Answers

What version of Windows are you running/testing on?

There's a feature of Windows 7 (not sure if it's in Vista as well, or perhaps even XP) where if you specify a web location (be it http or ftp), Windows downloads the file from that location and passes the path of the downloaded file, hence the Temp folder, to the application. As far as I can tell from the OpenFileDialog documentation on msdn there's no way to disable this behaviour.

You'll have to either roll your own implementation, or see if there's a PInvoke method you can use to persuade it not to exhibit this behaviour.

like image 70
Rob Avatar answered Nov 14 '22 22:11

Rob