I need to upload several files from a directory to a server via FTP and SFTP. I solved this problem for SFTP using python, paramiko and threading. But I have a problem doing this for FTP. I tried using ftplib for python, but it seems that it doesn’t support streaming, and I upload all the files one by one, which is very slow.
I am wondering if it is possible to make multi-threaded downloads with the FTP protocol without creating separate connections / authorizations (it takes too much time)?
The solution can be in Python or PHP. Maybe CURL? I would be grateful for any ideas.
source
share