From b5cadaae5f4010ae14bfce2714f446e90f16048a Mon Sep 17 00:00:00 2001 From: DanyLE Date: Fri, 27 Jan 2023 16:18:33 +0100 Subject: [PATCH] looking for mimes.json in either root folder or site folter --- silkmvc/core/mimes.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/silkmvc/core/mimes.lua b/silkmvc/core/mimes.lua index 798aaf8..09f9d8c 100644 --- a/silkmvc/core/mimes.lua +++ b/silkmvc/core/mimes.lua @@ -42,6 +42,9 @@ end function std.extra_mime(name) local ext = utils.ext(name) local mpath = __ROOT__ .. "/" .. "mimes.json" + if WWW_ROOT and not utils.file_exists(mpath) then + local mpath = WWW_ROOT .. "/" .. "mimes.json" + end local xmimes = {} if utils.file_exists(mpath) then xmimes = JSON.decodeFile(mpath)