title: Cloud Storage for Firebase SDK 6.1.0 : can't list files in a bucket using listAll()
body: <p>I am trying to get a list of all files from folder using listAll() method but can't do it.</p>
  
  <p>Here is the code</p>
  
  <pre><code>$(document).ready(function () {
      var storageRef = firebase.storage().ref(userid + "/");
  
      console.log(storageRef.listAll());
  
      storageRef.listAll().then(function (result) {
  
          result.items.forEach(function (imageRef) {
              imageRef.getDownloadURL().then(function (url) {
                  $("#album").append("&lt;div class='col-sm-12 col-lg-4'&gt;&lt;div class='card'&gt;&lt;div class='card-img-top'&gt;&lt;img src='" + url + "'&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;")
              }).catch(function (error) {
  
              });
          });
      }).
      catch(function (error) {
  
      });
  });
  </code></pre>
  
  <p>Current Firebase Rule :</p>
  
  <pre><code>service firebase.storage {
    match /b/{bucket}/o {
      match /{allPaths=**} {
        allow read, write;
      }
    }
  }
  </code></pre>
  
  <p>I got this error <code>Listing objects in a bucket is disallowed for rules_version = "1". Please update storage security rules to rules_verison = "2" to use list.</code> inside console.</p>
  
  <p>So what is this error tells? Am i need to change rule version inside firebase console? or should i make read and write rule to allow only authenticated user?</p>