I'm writing a python script that uploads a cvs file to a remote host via sftp (using pysftp). Everything appears to be working fine, but the uploaded file is always truncated to 4096 bytes. If I upload the file from the os (linux) using sftp, everything works fine. Is there a default that is set somewhere to only allow 4096 byte files?
Here's the sftp part of my code:
def sftp_file():
try:
s = sftp.Connection(host=dropbox, username='oemreport', private_key=private_key)
s.put(report_file, export_file)
s.close()
except Exception, e:
print str(e)