title: upload image file to google cloud storage
body: <p>I was trying to upload an image file to google cloud storage, following the google cloud storage documentation <a href="https://cloud.google.com/appengine/docs/php/googlestorage/user_upload" rel="nofollow">here</a>, but without success. </p>
  
  <p>The bucket that I created in my google cloud storage is named: test_app-111</p>
  
  <p>This is my <strong>app.yaml</strong> file:</p>
  
  <pre><code>application: test_app-111  
  version: 1
  runtime: php
  api_version: 1
  
  handlers:
  
  # Serve images as static resources.
  - url: /(.+\.(gif|png|jpg))$
    static_files: \1
    upload: .+\.(gif|png|jpg)$
    application_readable: true
  
  - url: /img.php
    script: img.php 
  </code></pre>
  
  <p>This is my php file called <strong>img.php</strong> :</p>
  
  <pre><code>&lt;?php
  
  require_once 'google/appengine/api/cloud_storage/CloudStorageTools.php';
  use google\appengine\api\cloud_storage\CloudStorageTools;
  
  $options = [ 'gs_bucket_name' =&gt; 'https://storage.googleapis.com/test_app-111.appspot.com' ];
  $upload_url = CloudStorageTools::createUploadUrl('/upload_handler.php', $options);
  
  ?&gt;
  
  
  &lt;form action="&lt;?php echo $upload_url?&gt;" enctype="multipart/form-data" method="post"&gt;
      Files to upload: &lt;br&gt;
     &lt;input type="file" name="uploaded_files" size="40"&gt;
     &lt;input type="submit" value="Send"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Any idea what am I missing? In the documentation it says "Create the application specific upload URL, using the method CloudStorageTools::createUploadUrl()". Do I have to create myself an upload URL? Anyone got an idea how to move on? </p>