📜  ftplib 上传文件 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:59.927000             🧑  作者: Mango

代码示例1
import ftplib
session = ftplib.FTP('server.address.com','USERNAME','PASSWORD')
file = open('kitten.jpg','rb')                  # file to send
session.storbinary('STOR kitten.jpg', file)     # send the file
file.close()                                    # close file and FTP
session.quit()