开发者

Add a link in webpage that links to a Windows Explorer window?

开发者 https://www.devze.com 2023-01-10 06:35 出处:网络
My client wants to add a link to a webpage. When the link is clicked, Windows Explorer will open and go to an FTP site (e.g., ftp://ftp.domain.com/). I tried the following HTML

My client wants to add a link to a webpage. When the link is clicked, Windows Explorer will open and go to an FTP site (e.g., ftp://ftp.domain.com/). I tried the following HTML

<a href="ftp://ftp.domain.com/">ftp://ftp.domain.com/</a>

Unfortunately, this will open the FTP site in the web browser which supports downloading only but not uploading.开发者_如何学Go

I prefer a cross-browser solution, but an IE-only solution would be fine as well.


Are you sure anonymous users can actually upload files?
You can supply a username/password combination by using:

<a href="ftp://username:password@domain.com">

If that fails, there's nothing you can do short of writing a web-based FTP client.

EDIT: AFAIK What program is used to open a protocol (FTP in this case) is defined by the browser and that's something you can't change.


If you want to be able to upload specify credentials that have write permission:

<a href="ftp://username:password@ftp.domain.com/">ftp://ftp.domain.com/</a>

But i'm not sure IE accepts that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号