diff --git a/src/Assets.jl b/src/Assets.jl index 5be20956f..ec5f6ab2d 100644 --- a/src/Assets.jl +++ b/src/Assets.jl @@ -328,7 +328,7 @@ function add_fileroute(assets_config::Genie.Assets.AssetsConfig, filename::Abstr basedir = pwd(), type::Union{Nothing, String} = nothing, content_type::Union{Nothing, Symbol} = nothing, - ext::Union{Nothing, String} = nothing, kwargs...) + ext::Union{Nothing, String} = nothing, named::Union{Symbol, Nothing} = nothing, kwargs...) file, ex = splitext(filename) ext = isnothing(ext) ? ex : ext @@ -345,7 +345,7 @@ function add_fileroute(assets_config::Genie.Assets.AssetsConfig, filename::Abstr Symbol("*.*") end : content_type - Genie.Router.route(Genie.Assets.asset_path(assets_config, type; file, ext, kwargs...)) do + Genie.Router.route(Genie.Assets.asset_path(assets_config, type; file, ext, kwargs...); named) do Genie.Renderer.WebRenderable( Genie.Assets.embedded(Genie.Assets.asset_file(cwd=basedir; type, file)), content_type) |> Genie.Renderer.respond