title: Download image by API
body: <p>I always use request.get method, but now need to upload image on hosting by the api. I get this error: TypeError: must be str, not InMemoryUploadedFile. Im understand, what arises this error. How do upload an image in the code?</p>
  
  <pre><code>data = request.FILES['avatar']
  api = 'http://uploads.ru/api?upload=' + data
  upload_image = requests.post(api)
  respons = upload_image
  </code></pre>