title: Connection lost using Twisted FTPClient storeFile
body: <p>I am attempting to use Twisted to run an FTP client/server on my computer.  I can successfully connect and do things like list the files in the directory of a given user, and retrieve files, but when I attempt to use the <code>storefile</code> function of <code>FTPClient</code>, I only get a connection lost error.  Here is my code for sending the file.</p>
  
  <pre><code>spath = 'client_text.txt'
  fileObject = open(spath, 'r')
  ft = FileSender()
  d1, d2 = ftpClient.storeFile(spath)
  d1.addCallbacks(sendFile, sendFileFail)
  d2.addCallbacks(success, fail)
  </code></pre>
  
  <p>and I get the error</p>
  
  <pre><code>[Failure instance: Traceback (failure with no frames): &lt;class 'twisted.protocols.ftp.ConnectionLost'&gt;: ('FTP connection lost', &lt;twisted.python.failure.Failure &lt;class 'twisted.internet.error.ConnectionLost'&gt;&gt;)
  </code></pre>
  
  <p>Any help with Twisted FTP would be nice, including any link to a fully functional example of the STOR command using Twisted.</p>