I need your help to save a PIL "image" to a server (SFTP) using the following example:
transport = paramiko.Transport((host, port))
transport.connect(username=user, password=pwd)
sftp = paramiko.SFTPClient.from_transport(transport)
w, h = 220, 190
image = Image.new("RGB", (w, h))
file = sftp.file("/volume/file.png", "w", -1) # the volume folder is located in the server
file.write(image)
file.flush()
But it does not work.