title: Node.js Overwriting a file
body: <p>I know it is a simple question, but haven't been able to find anything useful on this one.</p>
  
  <p>How do you use <code>fs.createWriteStream(dst)</code> to overwrite a file? (note that the app is hosted on heroku)</p>
  
  <p>I tried <code>{flags: 'w'}</code> or <code>{flags: 'r+'}</code> even <code>{flags: 'wb'}</code>. None of these worked, I keep getting 
  <code>Error: File uploads/1.txt exists.</code></p>