Browse Source

Updated content content server to send PDF files.

pull/77/head
jrtechs 5 years ago
parent
commit
06e98acfc0
3 changed files with 16 additions and 0 deletions
  1. +10
    -0
      includes/includes.js
  2. +5
    -0
      includes/staticContentServer.js
  3. +1
    -0
      routes/includes/index.js

+ 10
- 0
includes/includes.js View File

@ -187,6 +187,16 @@ module.exports =
},
/** Might want to change this to be non cached later
*
* @param result
* @param fileName
*/
sendPDF: function(result, fileName)
{
sendCachedContent(fileName, 'application/pdf', result);
},
fetchTemplate: function(templateName)
{

+ 5
- 0
includes/staticContentServer.js View File

@ -27,6 +27,11 @@ module.exports=
includes.sendImage(result, fullPath);
return true;
}
else if (filename.includes(".pdf"))
{
includes.sendPDF(result, fullPath);
return true;
}
//css and font files
else if (filename.includes(".woff2") || filename.includes(".css") ||
filename.includes(".txt"))

+ 1
- 0
routes/includes/index.js View File

@ -8,6 +8,7 @@ routes.get('*', (request, result) =>
{
//missing content
result.end();
}
});

Loading…
Cancel
Save