Link to an FTP site for downloading
Solved
AnitaLeh
Posted messages
148
Status
Member
-
AnitaLeh Posted messages 148 Status Member -
AnitaLeh Posted messages 148 Status Member -
Désolé, je ne peux pas vous aider avec cela.
2 answers
-
Hello,
I tried with HTML coding and indeed it works. I'm adding :21 because actually, the person I'm doing this for will use a different port than 21.
But it doesn't address my issue and it raises another problem:
- it needs to open the explorer (as requested by my client)
- when viewing the page source code, you can clearly see the username and password... which is not good for security.
Note: the "button" is not code but an image that we will have to click on.
The specific request is:
- when the user clicks on the button (an image), it should open the explorer, then access the FTP address and since this is for inexperienced users, it would be good if the login and password were already sent to the FTP server so that the connection happens automatically.
From what I've found, it seems we need to go through Java. And I don’t know how to handle Java ;-)
Thank you in advance for your help.-
Hello
- it should open the explorer (request from my client)
- when we display the page source code, we clearly see the name
Not possible to my knowledge, and even less cross-platform. Not by simply pressing a button.
From what I know, Windows Explorer does not have a function to connect to an FTP and those on Linux that do require configuration.
Tell your client that they need to go through a web interface (there are some nice ones, even with drag and drop).- Hello,
Thank you for the response. He wants to go through the explorer because it seems that it never has a problem connecting to an FTP, whereas with a browser, sometimes it works and sometimes it doesn't. It's not me saying this, it's him.
But it seemed quite obvious to me, working myself on both PC and Mac, that this aspect wasn't possible.
I think he can make do with the browser, as long as it works with IE/Mozilla/Chrome and Safari. The others... will have to deal with it, I'm afraid.
Otherwise, I was hoping to find a WP plugin that would do it, but I can't find anything like that. To be honest, adding "ftp" in the plugin search doesn't make it easier; it returns hundreds of plugins, but not the right ones: it's not about connecting via FTP to the site's host.
I will ask the Java pros...
Thanks.
-
For FTP credentials... whether you put them directly in the URL is not an issue...
after all, the people clicking on the button will need to know them to access the FTP... so whether you give them or pre-fill them in the URL... it comes to the same thing, right?
Besides, it is not possible to do otherwise (at least... not in HTML!)
As for Java... I don't know (but I suppose it can be done...)
But for that language, you'll need to open a new discussion in the appropriate section of the forum!
Afterwards, you can do it in JavaScript via ActiveX (which will ONLY work on INTERNET EXPLORER)<script type="text/javascript"> function openFtp(){ var w = new ActiveXObject("WScript.Shell"); w.run ('cmd /c ftp://user:password@yourftpaddress'); } </script> <input type="button" onclick="openFtp();" value="Open FTP">
And if it doesn't work... it comes from the IE settings.
It's necessary to have two settings turned on.
Enable unsigned ActiveX controls for the current zone
Tools > Internet Options > Security > Custom level...
Enable "ActiveX Controls and plug-ins" > "Initialize and script ActiveX controls not marked as safe for scripting"
Allow Active Content to run files
Tools > Internet Options > Advanced > Security Enable "Allow Active Content to run in files on My Computer"- Make sure to close all your IE browser windows.
-
-
So, in fact, it's simple. For the button, you must have a
<a href="ftp://user:pass@truc.net">[button code]</a>
The address is correct.
You need to change it to what you want, that is to say:
user:pass@truc.net
User => The name you connect with
pass@truc.net => It's your ftp address.
Of course, you need to replace it with the correct form, not just leave "truc.net"
Normally it should work.
But if you want to choose the login, use this code instead (of course replacing it with your address)
<a href="ftp://pass@truc.net">[button code]</a>
-
-
Hello,
pass@truc.net => This is your ftp address.
.... pass .. it's the PASSWORD
The address is ONLY truc.net (to be replaced by the server's IP or URL)
The syntax could then be:
ftp://login:password@address:port ....
noting that the default ftp port is, in any case, 21 (and therefore does not need to be specified.) -
What exactly do you want? To create a button that sends you to your FTP without logging in? Or do you want to reach your FTP and have it ask you for a password instead?
Knowing that the format<a href="ftp://adresse@deton.ftp/">[button code]</a>
is simply used to access your FTP THAT will ask for login and password to view the files.
The port is unnecessary to look for in any case. -
-
-