From 49b98b443a1e40babba951077947d9393392f115 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Mon, 8 Feb 2021 18:29:33 -0500 Subject: [PATCH] Added ability to include GIFs in blog posts --- includes/includes.js | 7 +++++++ includes/staticContentServer.js | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/includes/includes.js b/includes/includes.js index 6cab8d2..e4d64dd 100644 --- a/includes/includes.js +++ b/includes/includes.js @@ -175,6 +175,13 @@ module.exports = sendCachedContent(fileName, 'image/png', result); }, + //pronounced jjjif + sendGif: function(result, fileName) + { + sendCachedContent(fileName, 'image/gif', result); + }, + + /**Sends the user an image from the specified fileName. * diff --git a/includes/staticContentServer.js b/includes/staticContentServer.js index 118108c..23114ff 100644 --- a/includes/staticContentServer.js +++ b/includes/staticContentServer.js @@ -63,6 +63,11 @@ module.exports= includes.sendHTML(result, fullPath); return true; } + else if (filename.includes(".gif")) + { + includes.sendGif(result, fullPath); + return true; + } return false; } };