(
        *, path, file, host, port,
        username, password, use_active_mode=False, overwrite=True)
Opens a FTP connection with passed credentials,sets current directory
    to the directory extracted from given path, then uploads the file to server
Opens a FTP connection with passed credentials,sets current directory
    to the directory extracted from given path, then uploads the file to server
Opens a FTP connection with passed credentials sets current directory to the directory extracted from given path then uploads the file to server
def ftp_store_file(
        *, path, file, host, port,
        username, password, use_active_mode=False, overwrite=True):
    """Opens a FTP connection with passed credentials,sets current directory
    to the directory extracted from given path, then uploads the file to server
    """
    with FTP() as ftp:
        ftp.connect(host, port)
        ftp.login(username, password)
        if use_active_mode:
            ftp.set_pasv(False)
        file.seek(0)
        dirname, filename = posixpath.split(path)
        ftp_makedirs_cwd(ftp, dirname)
        command = 'STOR' if overwrite else 'APPE'
        ftp.storbinary(f'{command} {filename}', file)
        file.close()
def ftp_store_file ( * , path , file , host , port , username , password , use_active_mode = False , overwrite = True ) : with FTP ( ) as ftp : ftp . connect ( host , port ) ftp . login ( username , password ) if use_active_mode : ftp . set_pasv ( False ) file . seek ( 0 ) dirname , filename = posixpath . split ( path ) ftp_makedirs_cwd ( ftp , dirname ) command = 'STOR' if overwrite else 'APPE' ftp . storbinary ( f'{command} {filename}' , file ) file . close ( )