title: Uploading file from external URL on Google App Engine with Python
body: <p>Is it possible to upload an image from an external site (i.e. www.example.com/image.png) to the Google App Engine? This is not the same as uploading a file from a user submitted form. 
  If it's possible, any solutions? 
  I'm also using Google Cloud Storage, so if anybody has found a way to accomplish the same thing by uploading straight to Google Cloud Storage, please let me know.</p>
  
  <p>-- UPDATE ---</p>
  
  <p>I've followed the example from here - <a href="https://developers.google.com/appengine/docs/python/googlecloudstorageclient/getstarted" rel="nofollow">https://developers.google.com/appengine/docs/python/googlecloudstorageclient/getstarted</a> and 
  replaced the text write "abcd" with this:</p>
  
  <pre><code>url="example.com/image.jpeg"
  opener1 = urllib2.build_opener()
  page1 = opener1.open(url)
  
  write_retry_params = gcs.RetryParams(backoff_factor=1.1)
  gcs_file = gcs.open(filename,
                          'w',
                          content_type='image/jpeg',
                          options={'x-goog-meta-foo': 'foo',
                                   'x-goog-meta-bar': 'bar'},
                          retry_params=write_retry_params)
  gcs_file.write(page1.read())
  gcs_file.close()
  </code></pre>
  
  <p>The problem is - when I run this code, it tries to download the image to my computer (the client) instead of downloading to the gcs_file. I get the download file popup.... That's not what I'm trying to do. What am I doing wrong? </p>