title: Firebase storage rules, `request.resource.md5hash` is null
body: <p>I'm trying to build a web app using FireBase backend and I have a storage rule as the following:</p>
  
  <pre><code>service firebase.storage {
    match /b/stuff.appspot.com/o {
      match /images/{fname}
      {
        allow read: if true;
        allow write: if request.resource.md5hash != null;
      }
    }
  }
  </code></pre>
  
  <p>However, when I try to put data to <code>images/filename</code>, I'm getting a <code>storage/unauthorized</code> error. If I remove the condition and set to just <code>true</code>, it works as expected and therefore I think the <code>request.resource.md5hash</code> is null.</p>
  
  <p>What am I missing? Because I would expect any file to have a non-null md5 hash.</p>
  
  <p>Additional notes:</p>
  
  <ul>
  <li>If I remove the md5 condition and upload a file without any check, I can get the <code>md5Hash</code> in the client of the uploaded file. Therefore, a hash is actually being calculated at some point.</li>
  <li>In <a href="https://firebase.google.com/docs/reference/security/storage/#properties_1" rel="nofollow">the reference about storage rules</a> <code>md5hash</code> field is used, so it's expected to work.</li>
  </ul>