Damon 0 Posted December 29, 2024 Something that would seem it should be not difficult to implement is making me crazy. I've tried 50 combinations of setting with the indy idftp component and idanitfreeze and idssliohandler. Zero success. Multiple different errors. Ultimately it will not authenticate the connection. Coreftp has zero issues connecting with no fancy setting entries required. What on earth makes this so difficult. If these legacy indy components are the problem, please tell me. Delphi 12, indy 10.6.2 according to the about page. All i want to do is have my application connect to the hosting account with an ftp account that is setup, and let the user browse to a photo with an opendialog, and select that photo and have the application upload it. Frustrated. Thanks in advance for any insight. Share this post Link to post
Lajos Juhász 300 Posted December 29, 2024 I believe the 3rd character in the 10th line of your code is wrong. On a more serious note without any details what the server expects and how you tried to connect we can not help. 2 Share this post Link to post
stijnsanders 37 Posted December 29, 2024 I created my own web platform for Delphi just to be able to things like this: xxm It takes some work setting it up, but once you get it working it handles uploads just fine: https://github.com/stijnsanders/xxm/tree/master/Delphi/demo/04 Upload and if you're ready for it, there's a way to follow upload progress https://github.com/stijnsanders/xxm/tree/master/Delphi/demo/09 Upload Progress but that's already quite advanced. Do tell us more about what it's you'er trying to do and what you've been trying. Share this post Link to post
Damon 0 Posted December 29, 2024 34 minutes ago, Lajos Juhász said: I believe the 3rd character in the 10th line of your code is wrong. On a more serious note without any details what the server expects and how you tried to connect we can not help. There is no code to review. I can't even get idftp1.connect; to work. idftp is set with the correct host, username, and password, port 21. Same as coreftp that works just fine. I see this as an issue in what the server wants vs the indy component providing or lack of. I have set passive to true, tls to explicit (as well as trying the others.) I've tried all tls versions. The farthest i got at one point was a socket timeout 10060. More often, it just comes back with an authentication error that is nondescriptive. Share this post Link to post
ToddFrankson 3 Posted December 29, 2024 1 hour ago, Damon said: tls to explicit I expect you don't have an SSLHandler, which is required if you are using SSL by setting TLS to Explicit. Share this post Link to post
DelphiUdIT 195 Posted December 29, 2024 (edited) Please, post some minimal code. You use TLS ... are you put in the directory of you app the openssl dll (x86 or x64) version 1.0.2u (the last pubblic free version supported by Indy in bundle version of Rad Studio) ? EDIT: I posted here a Demo from Indy with FTP and SSL working. Inside there are the right openssl DLLs 1.0.2u for x64. You can replace them of course if you don't trust. I don't remember if this is the original demo code or I changed it to works with TLS. FTP.zip Edited December 29, 2024 by DelphiUdIT Share this post Link to post
Remy Lebeau 1445 Posted December 29, 2024 3 hours ago, Damon said: I've tried 50 combinations of setting with the indy idftp component and idanitfreeze and idssliohandler. Zero success. Multiple different errors. Ultimately it will not authenticate the connection. What are the EXACT error messages? What EXACTLY did you try? What are your EXACT property settings? 3 hours ago, Damon said: Coreftp has zero issues connecting with no fancy setting entries required. What on earth makes this so difficult. Umm, you are comparing a higher-level APPLICATION to a lower-level LIBRARY. Of course, a LIBRARY is going to be more flexible and thus require more configuration for meet your particular situation. 3 hours ago, Damon said: All i want to do is have my application connect to the hosting account with an ftp account that is setup, and let the user browse to a photo with an opendialog, and select that photo and have the application upload it. Frustrated. Seems simple enough. Please show the EXACT code you are trying to use to accomplish that. 2 hours ago, Damon said: There is no code to review. I can't even get idftp1.connect; to work. Then you don't have TIdFTP setup correctly to match your server's requirements. 2 hours ago, Damon said: idftp is set with the correct host, username, and password, port 21. Those are not the only settings involved. What ELSE do you have configured EXACTLY? 2 hours ago, Damon said: Same as coreftp that works just fine. Well, then you should have no trouble grabbing logs from CoreFTP and TIdFTP and compare them for differences. At what stage EXACTLY in the communication is the failure actually occurring? There are several different possibilities, which is why more DETAIL is needed. 2 hours ago, Damon said: I see this as an issue in what the server wants vs the indy component providing or lack of. Probably, but without any DETAIL about your setup or your server's requirements, there is simply no way for anyone here to know for sure what is actually wrong/missing. 2 hours ago, Damon said: I have set passive to true, tls to explicit (as well as trying the others.) I've tried all tls versions. The farthest i got at one point was a socket timeout 10060. Provided the server is actually reachable and responsive, most often a timeout error on a connect is due to a mismatch between the Port and UseTLS properties, causing Indy to wait for a server greeting that is never sent because the server is waiting for a TLS handshake from the client first. 2 hours ago, Damon said: More often, it just comes back with an authentication error that is nondescriptive. Again, what is the EXACT error message? Is it an FTP-level error or a TLS-level error? 1 hour ago, ToddFrankson said: I expect you don't have an SSLHandler, which is required if you are using SSL by setting TLS to Explicit. You can't set the UseTLS property to Explicit (or Implicit) without having an SSLIOHandler assigned first. 2 Share this post Link to post