title: mongodb - issue with same file name in fs.files GridFS
body: <p>I have multiple files in <code>fs.files</code> collection in mongodb GridFS with same name but for different Users.</p>
  
  <p>When I use below query:</p>
  
  <pre><code>db.fs.files.find({"metadata.folder" : { "$exists": false,"metadata.msgid" : { "$exists": false}},{"metadata.user":1, "_id":0, "filename":1}).pretty()
  </code></pre>
  
  <p>I get result like : </p>
  
  <pre><code>{ "filename" : "standard.wav", "metadata" :
  { "user" : "101" }
  
  }
  { "filename" : "standard.wav", "metadata" :
  { "user" : "100" }
  
  }
  { "filename" : "standard.wav", "metadata" :
  { "user" : "104" }
  
  }
  </code></pre>
  
  <p>Files are different for all Users but having same name.</p>
  
  <p>So when I used following commands to store files in local system for different users, it always store same file for all Users.</p>
  
  <p>For User 101 :</p>
  
  <pre><code>mongofiles --uri MONGO_DSN -d test -l /home/user/101/standard.wav get standard.wav
  </code></pre>
  
  <p>For User 100 : </p>
  
  <pre><code>mongofiles --uri MONGO_DSN -d test -l /home/user/100/standard.wav get standard.wav
  </code></pre>
  
  <p>For User 104 : </p>
  
  <pre><code>mongofiles --uri MONGO_DSN -d test -l /home/user/104/standard.wav get standard.wav
  </code></pre>
  
  <p>It should store different files for different users.</p>
  
  <p>Thanks in advance.</p>