title: Error: ENOENT when renaming file in node/express app
body: <p>I am attempting to upload a file in my node/express app, and I am getting the following error:</p>
  
  <pre><code>{ [Error: ENOENT, rename '/tmp/64124a9886fdb03f1faee159bc533776']
    errno: 34,
    code: 'ENOENT',
    path: '/tmp/64124a9886fdb03f1faee159bc533776' }
  
  /home/frankie/Projects/LP/routes/manager/deliverables.js:51
                              throw err;
                                    ^
  Error: ENOENT, rename '/tmp/64124a9886fdb03f1faee159bc533776'
  </code></pre>
  
  <p>Here is the relevant code from my app:</p>
  
  <pre><code>if (req.files.file.name !== '' &amp;&amp; req.files.file.size !== 0) {
      // this will move the uploaded file from the tmp folder to the uploads folder
      fs.rename(req.files.file.path, app.get('loc') +  "uploads/" + name + "-" + id + "/" + req.files.file.name, function (err) {
          if (err) throw err;
  </code></pre>
  
  <p>When I check what is in /tmp the file is there:</p>
  
  <pre><code>fiega@fiega:/tmp$ ll
  total 56
  drwxrwxrwt 12 root    root    4096 Dec 12 11:33 ./
  drwxr-xr-x 23 root    root    4096 Sep 27 22:54 ../
  -rw-rw-r--  1 fiega   fiega    903 Dec 12 11:33 13a26570f87297fd7f61785ef7d8772b
  </code></pre>
  
  <p>This is how I am using body parser:</p>
  
  <pre><code>app.use(express.cookieParser());
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  </code></pre>
  
  <p>Any ideas? I have tried changing the permissions of my entire my app but no dice.</p>