diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2019-04-07 16:32:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-07 16:32:58 +0300 |
commit | 0355ebe7d56f7b0de579740c99bd0aabb62bf0e0 (patch) | |
tree | ab123dfaee0a15c67c2bad029dd3fae34072d122 | |
parent | 6c83231b19467b8866552ea1b735d8575e5ccf6f (diff) | |
parent | 8a4cc6304e423ada070decdadec9fb82e86f0c59 (diff) |
Merge pull request #2664 from rosysong/file-server
rosy-file-server: remove unused lines and typo fix
-rw-r--r-- | applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua b/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua index 6c7c49208..dd5598a68 100644 --- a/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua +++ b/applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua @@ -21,7 +21,7 @@ function index() page.index = false page = node("httpfs") - page.title = _("File-server") + page.title = _("Rosy File Server") page.target = alias("httpfs", "rosy-file-server") page.order = 5 page.setuser = "root" @@ -30,23 +30,8 @@ function index() entry({"httpfs", "rosy-file-server"}, form("rosy-file-server/rosy-file-server"), _("Rosy File Server"), 10) - entry({"httpfs", "file-server-download"}, - post("action_download"), nil) entry({"admin", "services", "rosyfs"}, cbi("rosy-file-server/rosyfs"), _("Rosy File Server"), 61) end -function action_download() - local p = luci.http.formvalue("path") or "" - local n = luci.http.formvalue("name") or "" - - if not p or not n then - luci.http.status(400, "Bad Request") - return - end - - luci.http.header('Content-Disposition', 'attachment; filename="%s"' % n) - luci.http.prepare_content("application/octet-stream") - luci.sys.process.exec({ "/bin/dd", "if=%s%s" % { p, n }, "conv=fsync,notrunc" }, luci.http.write) -end |