title: how to transfer ImageField file to multipart/form-data which will be posted by requests
body: <p>python3.6,I got a ImageField image in Django 2.2, how can i transfer it to multipart/form-data ,then post it with requests </p>
  
  <p>I have tried requests-toolbelt, add Content-Type: Multipart/Form-data boundry=......</p>
  
  <p>it returns 403
  here is code:</p>
  
  <pre><code>from requests_toolbelt import MultipartEncoder
  import requests
      multipart_encoder = MultipartEncoder(fields={
                      "api_key": self.api_key,
                      "api_secret": self.api_secret,
                      "comparison_type": comparison_type,
                      "image_ref1": (image_ref1.name.rsplit("/")[1], image_ref1.file.file, "image/" + "jpeg" if image_ref1.name[-3:] == "jpg" or image_ref1.name[-3:] == "jpeg" else "png") if image_ref1 else None,
                      "uuid": uuid,
                      "biz_no": biz_no,
                      "screen_replay": "1",
                      "biz_extra_data": str(biz_extra_data)
                  })
  
              self.headers["Content-Type"] = "multipart/form-data; boundary=${bound}"
              self.headers['Content-Type'] = multipart_encoder.content_type
              if all([self.api_key, self.api_secret, return_url, notify_url, biz_no]):
                  # try:
                  res = requests.post(url=API_URL, headers=self.headers, data=multipart_encoder, timeout=5)
  </code></pre>
  
  <p>403 Denied, request wil be ok without image</p>