code: def put(self, local, remote, contents=None, quiet=False):
          
          remote_dir = os.path.dirname(remote)
          remote_file = os.path.basename(local)\
              if remote.endswith('/') else os.path.basename(remote)
  
          if contents:
              # local is ignored if contents is set
              local_file = buffer_type(contents)
          elif isinstance(local, file_type):
              local_file = local
          else:
              local_file = open(local, 'rb')
          current = self.conn.pwd()
          self.descend(remote_dir, force=True)
  
          size = 0
          try:
              self.conn.storbinary('STOR %s' % remote_file, local_file)
              size = self.conn.size(remote_file)
          except:
              if not quiet:
                  raise
          finally:
              local_file.close()
              self.conn.cwd(current)
          return size
docs: Puts a local file (or contents) on to the FTP server
  
              local can be:
                  a string: path to inpit file
                  a file: opened for reading
                  None: contents are pushed