Functional FTP upload code.