luci-app-rosy-file-server: remove unused lines
Signed-off-by: Rosy Song <rosysong@rosinson.com>
This commit is contained in:
parent
6ca92f79ca
commit
8a4cc6304e
1 changed files with 0 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue