1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-26 01:18:21 +01:00
This commit is contained in:
Xuan Sang LE 2018-08-28 10:29:23 +02:00
parent ca542b765f
commit 97049638ac

View File

@ -51,7 +51,8 @@ function Router:infer(url)
if not _G[controller_name] then
-- verify if it is an asset
url = url:gsub("/", DIR_SEP)
if ulib.exists(WWW_ROOT..DIR_SEP..url) then
local filepath = WWW_ROOT..DIR_SEP..url
if ulib.exists(filepath) and not std.is_dir(filepath) then
data.controller = AssetController:new {registry = self.registry}
data.action = "get"
data.name = "asset"