...
 
Commits (2)
......@@ -12014,6 +12014,11 @@
}
}
},
"os": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/os/-/os-0.1.1.tgz",
"integrity": "sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M="
},
"os-browserify": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
......
......@@ -35,8 +35,6 @@ fileUtils.makeDir(`${dataDirectoryPath}/uploads/`)
throw err
})
const secretFile = require(`${dataDirectoryPath}/secret.json`)
const app = express(feathers())
......@@ -79,6 +77,14 @@ app.service('authentication').hooks({
}
})
app.get('/uploads/:domain/:id', function (req, res) {
res.sendFile(`${req.params.domain}/${req.params.id}`, {root: `${dataDirectoryPath}/uploads/`}, err => {
if (err) {
res.status(err.status).end()
}
})
})
// Configure other middleware (see `middleware/index.js`)
app.configure(middleware)
// Set up our services (see `services/index.js`)
......