title: Right way to manage application generated files
body: <p><strong>tl;dr</strong></p>
  
  <p><strong>In my node.js application I create pdf documents. What is the best/right way to save them? Right now I use node.js fileserver and shell.js to do it.</strong></p>
  
  <p>I am working on a node.js web application to manage apartments and tenants for learning purpose and on some point I create PDF Documents that I want to save under a path </p>
  
  <blockquote>
    <p>/documents/building_name/apartment_name/tenant_name/year/example.pfd</p>
  </blockquote>
  
  <p>Now if the user wants to change the building, apartment or tenant name via an http PUT request I change the database but also the want to change the path.</p>
  
  <p>Well both works but I can't write good tests for these functions.</p>
  
  <p>Now a friend told me that it's a bad practice to save documents on a file server and I better should use BLOB.</p>
  
  <p>On the other side google doesn't really agree on using blobs</p>
  
  <p>So what is the right way to save documents?</p>
  
  <p>Thanks </p>
  
  <p>Amit</p>