title: S3 Multipart upload in Chunks
body: <p>I am trying to upload a file from a url into my s3 in chunks, my goal is to have python-logo.png in this example below stored on s3 in chunks image.000 , image.001 , image.002 etc. i have the below code but i am getting error <code>ValueError: Fileobj must implement read</code> can some one point me out to what i am doing wrong? please not the actual data i am trying to upload is much larger, this image file is just for example.</p>
  <pre><code>import threading
  import requests
  import boto3
  from boto3.s3.transfer import TransferConfig
  
  bucket_name = &quot;bucket-name-here&quot;
  
  def multi_part_upload_with_s3():
      # Multipart upload
      config = TransferConfig(multipart_threshold=100000, max_concurrency=80,
                              multipart_chunksize=100000, use_threads=True)
      url = &quot;https://www.python.org/static/img/python-logo.png&quot;
      r = requests.get(url, stream=True)
      session = boto3.Session()
      s3 = session.resource('s3')
      key = 'brokenup/image.'
      bucket = s3.Bucket(bucket_name)
      num = 0
      for chunk in r.iter_content(100000):
          file = key+str(num).zfill(3)
          num += 1
          bucket.upload_fileobj(chunk, file, Config=config, Callback=None)
  </code></pre>