summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
index a8c577929..72e87e8f9 100644
--- a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
+++ b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
@@ -57,6 +57,8 @@ function action_data()
json = "application/json"
}
+ local filename = "data." .. mtype
+
local args = { }
local mtype = http.formvalue("type") or "json"
local delim = http.formvalue("delim") or ";"
@@ -92,6 +94,7 @@ function action_data()
end
http.prepare_content(types[mtype])
+ http.header("Content-Disposition", "attachment; filename=\"%s\"" % filename)
exec("/usr/sbin/nlbw", args, http.write)
end