title: Python S3 upload of zip file gives AttributeError: 'ZipFile' object has no attribute 'tell' error
body: <pre><code>I try to upload a zip file to my S3 bucket, but getting 
  </code></pre>
  
  <blockquote>
    <p>AttributeError: 'ZipFile' object has no attribute 'tell' error</p>
  </blockquote>
  
  <pre><code>conn = boto.s3.connect_to_region(region_name=s3region,
                                               aws_access_key_id=userid,
                                               aws_secret_access_key=accesskey,
                                        calling_format=boto.s3.connection.OrdinaryCallingFormat())
  
              bucket = conn.get_bucket(s3bucket)
  
              k = boto.s3.key.Key(bucket, zipf)
  
              k.send_file(zipf) //&lt;----Gives Exception
  </code></pre>
  
  <p>What is wrong here? (zipf is my zipfile)</p>
  
  <p>if I modify the code like this;</p>
  
  <pre><code>   with open(zipf) as f:
              k.send_file(f)
  </code></pre>
  
  <p>I get </p>
  
  <blockquote>
    <p>TypeError: coercing to Unicode: need string or buffer, ZipFile found</p>
  </blockquote>
  
  <p>I created zip file like;</p>
  
  <pre><code>zipfilename = 'AAA_' + str(datetime.datetime.utcnow().replace(microsecond=0)) + '.zip'
      zipf = zipfile.ZipFile(zipfilename, mode='w')
  
      for root, dirs, files in os.walk(path):
          for f in files:
              zipf.write(os.path.join(root, f))
      zipf.close()
  </code></pre>