X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Ffiles.js;h=c725e4bac5e6a22882defcaac083ca5e632d9fcb;hb=cfe24a278b68cd859e8f98cb0d8be92d49508a32;hp=6946ff30b51404c0ccbe97564ce8bc2fa7488605;hpb=a90a633f030f44bd8142e1d44a8312e952e620bb;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git diff --git a/src/files.js b/src/files.js index 6946ff3..c725e4b 100644 --- a/src/files.js +++ b/src/files.js @@ -75,7 +75,7 @@ function get(req, res, next) { debug('get', absoluteFilePath); - if (result.isFile()) return res.sendfile(absoluteFilePath); + if (result.isFile()) return res.sendFile(absoluteFilePath); if (result.isDirectory()) return res.status(200).send({ entries: fs.readdirSync(absoluteFilePath) }); return next(new HttpError(500, 'unsupported type'));