Python fails while uploading a file which its size bigger than 8192 bytes. And the exception is only "got more than 8192 bytes". Is there a solution to upload larger files.
try:
ftp = ftplib.FTP(str_ftp_server )
ftp.login(str_ftp_user, str_ftp_pass)
except Exception as e:
print('Connecting ftp server failed')
return False
try:
print('Uploading file ' + str_param_filename)
file_for_ftp_upload = open(str_param_filename, 'r')
ftp.storlines('STOR ' + str_param_filename, file_for_ftp_upload)
ftp.close()
file_for_ftp_upload.close()
print('File upload is successful.')
except Exception as e:
print('File upload failed !!!exception is here!!!')
print(e.args)
return False
return True
ftp.storbinary()
.