Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
483 B

  1. const utils = require('../utils/utils.js');
  2. module.exports=
  3. {
  4. /**Sends the user an image from the specified fileName.
  5. *
  6. * @param result
  7. * @param fileName
  8. */
  9. main: function(result, fileName)
  10. {
  11. result.contentType = 'image/png';
  12. utils.include("." + fileName).then(function(content)
  13. {
  14. result.write(content);
  15. result.end();
  16. });
  17. }
  18. };