title: TypeError: expected str, bytes or os.PathLike object, not _io.BytesIO
body: <p>Trying to upload a file off the internet to my server using ssh. Have the following code that uploads local files fine, but I do not know what more to do to get the picture bytes object to upload.</p>
  
  <pre><code>from io import BytesIO
  import requests
  import pysftp
  url = 'https://vignette.wikia.nocookie.net/disney/images/d/db/Donald_Duck_Iconic.png'
  
  cnopts = pysftp.CnOpts()
  cnopts.hostkeys = None 
  response = requests.get(url)
  netimage = BytesIO(response.content) #imagefromurl
  
  srv = pysftp.Connection(host="12.34.567.89", username="root123",
  password="password123",cnopts=cnopts)
  
  with srv.cd('/var/www'): #srvdir
      #srv.put('C:\Program Files\Python36\LICENSE.txt') #local file test
      srv.put(netimage) 
  
  print('Complete')
  </code></pre>