title: How to get the link of uploaded file using firebase in realtime?
body: <p>I am using firebase storage for uploading files. The code is:</p>
  
  <pre><code>StorageReference storageRef = storage.getReferenceFromUrl("gs://fir-896a6.appspot.com");
  
  final Uri selectedFile = data.getData();
  
  StorageReference uploadRef = storageRef.child(selectedFile.getLastPathSegment());
  UploadTask uploadTask = uploadRef.putFile(selectedFile);
  
  uploadTask.addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
                  @Override
                  public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                    Log.i("Success", "uploaded");
                  }
  
  }
  </code></pre>
  
  <p>It successfully uploads file. Now as the upload complete i want both links to that file (eg. <a href="https://firebasestorage.googleapis.com/v0/b/fir-896a6.appspot.com/o/17992?alt=media&amp;token=68bd978a-4def-40d8-8edb-6526a15a94e3" rel="nofollow">https://firebasestorage.googleapis.com/v0/b/fir-896a6.appspot.com/o/17992?alt=media&amp;token=68bd978a-4def-40d8-8edb-6526a15a94e3</a>
  and
  gs://fir-896a6.appspot.com/17992) in realtime(maybe on onSuccessListener)</p>