Modified script to upload to an insecure ftp folder

This commit is contained in:
Manuel Cortez 2021-01-19 15:32:23 -06:00
parent ee1e13deac
commit 0e63c3e148

View File

@ -51,12 +51,12 @@ version = os.environ.get("CI_COMMIT_TAG") or "latest"
version = version.replace("v", "") version = version.replace("v", "")
print("Uploading files to the Socializer server...") print("Uploading files to the Socializer server...")
connection = MyFTP_TLS(ftp_server) connection = ftplib.FTP(ftp_server)
print("Connected to FTP server {}".format(ftp_server,)) print("Connected to FTP server {}".format(ftp_server,))
connection.login(user=ftp_username, passwd=ftp_password) connection.login(user=ftp_username, passwd=ftp_password)
connection.prot_p() #connection.prot_p()
print("Logged in successfully") print("Logged in successfully")
connection.cwd("manuelcortez.net/static/files/music_dl") connection.cwd("music_dl")
if version not in connection.nlst(): if version not in connection.nlst():
print("Creating version directory {} because does not exists...".format(version,)) print("Creating version directory {} because does not exists...".format(version,))
connection.mkd(version) connection.mkd(version)