summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-rosy-file-server/luasrc
diff options
context:
space:
mode:
authorRosy Song <rosysong@rosinson.com>2019-04-07 18:46:12 +0800
committerRosy Song <rosysong@rosinson.com>2019-04-07 18:46:12 +0800
commit8a4cc6304e423ada070decdadec9fb82e86f0c59 (patch)
treeab123dfaee0a15c67c2bad029dd3fae34072d122 /applications/luci-app-rosy-file-server/luasrc
parent6ca92f79ca26602c7fae134672a78a350acd0703 (diff)
luci-app-rosy-file-server: remove unused lines
Signed-off-by: Rosy Song <rosysong@rosinson.com>
Diffstat (limited to 'applications/luci-app-rosy-file-server/luasrc')
-rw-r--r--applications/luci-app-rosy-file-server/luasrc/controller/rosy-file-server/rosy-file-server.lua15
1 files changed, 0 insertions, 15 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 2575151a7..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
@@ -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