FTP.storbinary()
FTP.storbinary() is a Python method in the Ftplib Module category. Uploads a file in binary mode to the FTP server. The syntax is FTP.storbinary(cmd, fp, blocksize=8192, callback=None, rest=None). Returns: Server response string. A typical example: with open("local.txt", "rb") as f:
ftp.storbinary("STOR remote.txt", f). A close sibling is ftplib.FTP(), which creates an FTP client for file transfer. A close sibling is FTP.login(), which logs in to the FTP server with username and password. A close sibling is FTP.cwd(), which changes the current working directory on the FTP server. A close sibling is FTP.retrbinary(), which retrieves a file in binary mode from the FTP server. More about this category: FTP client — FTP, login, retrbinary, storbinary, nlst, cwd. Related Ftplib Module entries: ftplib.FTP(), FTP.login(), FTP.cwd(), FTP.retrbinary(), FTP.nlst(), FTP.retrlines(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.