title: Get publicly accessible URL from Google Cloud after upload PHP
body: <p>The problem is after I upload an object to my publicly accessible Google Cloud bucket, I want to use the created URL immediately for another service. However, I don't see a way to get the mediaUrl that I could then use. All of the properties on the following method that would give me that are private:</p>
  
  <pre><code>$bucket-&gt;upload(
      fopen($_FILES['file']['tmp_name'], 'r'),
      array('name' =&gt; $name)
  );
  </code></pre>
  
  <p>I've already tried var_dump-ing the above method to see if any of the public properties would give me the created URL, but it doesn't even have any public properties.</p>
  
  <p>Here's the code I'm using to upload the data:<br></p>
  
  <pre class="lang-php prettyprint-override"><code>$storage = new StorageClient([
      'keyFilePath' =&gt; 'keyfile_json.json'
  ]);
  $bucket = $storage-&gt;bucket('bucket');
  
  $name = 'some/name/path/'.$_POST['name'];
  
      $bucket-&gt;upload(
          fopen($_FILES['file']['tmp_name'], 'r'),
          array('name' =&gt; $name)
  );
  </code></pre>
  
  <p>The file is uploading, I just can't get the URL of the actual resource that I can then go use in a different API call to a different service.</p>
  
  <p><strong>How can I get the URL of the resource after it is uploaded?</strong></p>