title: How can I get the full URL of file uploaded to s3 with Laravel?
body: <p>I have this to upload pictures to one <code>bucket</code> on <code>s3</code> in <code>AWS</code></p>
  
  <pre><code>$image = $picture;
  $ext = explode(";", explode("/",explode(",", $image)[0])[1])[0];
  $image = str_replace('data:image/'.$ext.';base64,', '', $image);
  $image = str_replace(' ', '+', $image);
  $imageName = str_random(10) . '.' . $ext;
  $fullImagePath = 'datasheets/' . $imageName;
  Storage::disk('s3')-&gt;put($fullImagePath, base64_decode($image));
  
  $DataSheetPicture = new DataSheetPicture();
  $DataSheetPicture-&gt;data_sheet_id = $DataSheet-&gt;id;
  $DataSheetPicture-&gt;picture = Storage::disk('s3')-&gt;url($fullImagePath);
  $DataSheetPicture-&gt;save();
  </code></pre>
  
  <p>The above code works fine, it uploads the pictures successfully to the <code>bucket</code>, but on this line</p>
  
  <pre><code>$DataSheetPicture-&gt;picture = Storage::disk('s3')-&gt;url($fullImagePath);
  </code></pre>
  
  <p>It saves the URL in the database like these</p>
  
  <blockquote>
    <p>/datasheets/6GcfzgUPrA.jpeg<br />
    /datasheets/AuqHmu8p0W.jpeg</p>
  </blockquote>
  
  <p>But I need get the URL like this</p>
  
  <blockquote>
    <p><a href="https://s3.REGION.amazonaws.com/BUCKET-NAME/FULL-IMAGE-PATH" rel="nofollow noreferrer">https://s3.REGION.amazonaws.com/BUCKET-NAME/FULL-IMAGE-PATH</a></p>
  </blockquote>
  
  <p>I don't want to concatenate the region or the bucket name because it could be dynamic</p>