Question about PB's built-in FTP

Everything else that doesn't fall into one of the other PB categories.
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Question about PB's built-in FTP

Post by dige »

Hi guys, what are your experiences with the internal FTP functions?

For a project I need a file transfer for the first time and have to connect to an intranet Microsoft IIS FTP server.

I can connect anonymously and do not need any special requirements. With a file manager such as Total Commander or Double Commander, I can easily connect as an anonymous user and upload files.

With PB FTP I can connect and (presumably) select the target directory. But SendFTPFile() simply fails.

So I wonder if I should invest more time in this or if there are already known limitations in the FTP implementation?

Fortunately I found PB.Ex_FTP. It worked right away. But I would like to avoid external dependencies.


What do you think?


This is my code:

Code: Select all


Procedure FTP_Transfer()
  Protected Result
  
  If OpenFTP(0, "192.168.150.126", "anonymous", "anonymous@anonymous.org", #False, 21)
    
    If SetFTPDirectory(0, "ps")
      Debug "Directory set to /ps"
    EndIf
    
    Debug IsFTP(0)
    
    
    Result = SendFTPFile(0, OpenFileRequester("Choose a file to send", "", "*.*", 0), "purebasic_sent.pb")
    Debug "Result: " + Str(Result)
    
  EndIf  
  
EndProcedure

FTP_Transfer()

MessageRequester( "FTP done", "")

End

"Daddy, I'll run faster, then it is not so far..."
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Question about PB's built-in FTP

Post by Fred »

The built-in FTP is old and doesn't work everywhere, I plan to change it somewhen to use libcurl instead.
User avatar
HeX0R
Addict
Addict
Posts: 1187
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Question about PB's built-in FTP

Post by HeX0R »

How many Bucks would be needed to get from "somewhen" to "soon"? :mrgreen:
Quin
Addict
Addict
Posts: 1124
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Question about PB's built-in FTP

Post by Quin »

I am interested as well, would gladly help fund a better FTP lib :)
HeX0R wrote: Tue Mar 12, 2024 10:21 pm How many Bucks would be needed to get from "somewhen" to "soon"? :mrgreen:
BarryG
Addict
Addict
Posts: 4123
Joined: Thu Apr 18, 2019 8:17 am

Re: Question about PB's built-in FTP

Post by BarryG »

dige wrote: Tue Mar 12, 2024 1:43 pmwhat are your experiences with the internal FTP functions?
Works great for me. SendFTPFile() works as expected when I upload files to my website.
hoerbie
Enthusiast
Enthusiast
Posts: 136
Joined: Fri Dec 06, 2013 11:57 am
Location: DE/BY/MUC

Re: Question about PB's built-in FTP

Post by hoerbie »

I'm also willing to fund a "soon" update, when it enables to use FTPS or SFTP from PB.
Post Reply