       if req.headers['if-modified-since'] is filedata.uploadDate
         res.status(304)
         return res.end()
-  
+
       res.setHeader('Content-Type', filedata.contentType)
       res.setHeader('Last-Modified', filedata.uploadDate)
       res.setHeader('Cache-Control', 'public')

    objectId = mongoose.Types.ObjectId(path)
    query = objectId
  catch e
    path = path.split('/')    
    filename = path[path.length-1]
    path = path[...path.length-1].join('/')
    query =

      name: req.body.name
      path: path
      creator: ''+req.user._id
  options.metadata.description = req.body.description if req.body.description?

  options
