The code above saves the ZIP to disk first. For a true efficiency upgrade, use on-the-fly compression . This sends the ZIP data directly to the FTP server without saving a temporary file.
Depending on your hardware, pick the method that fits your needs: zip net ftp server
He didn't throttle the connection. Instead, he stayed up all night, watching the RETR (retrieve) commands finish one by one. By dawn, the "guest" disconnected, leaving behind a simple message: “Thank you for keeping the light on.” The code above saves the ZIP to disk first