From a4a8c0b68842b40d3c100a72f1b9dce69cf5a844 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Thu, 25 May 2023 19:16:02 +0300 Subject: [PATCH] Update channels.js --- scripts/db/schemes/channels.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/db/schemes/channels.js b/scripts/db/schemes/channels.js index 20c60b2a..419be527 100644 --- a/scripts/db/schemes/channels.js +++ b/scripts/db/schemes/channels.js @@ -53,7 +53,7 @@ module.exports = { scheme: ['https'] }) .custom((value, helper) => { - const ext = path.extname(value) + const ext = path.extname(path.basename(value)) if (!ext || /(\.png|\.jpeg|\.jpg)/i.test(ext)) { return true } else {