summaryrefslogtreecommitdiff
path: root/lang/python/python3/files/python3-package-xml.mk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-13 07:23:25 +0200
committerJohn Crispin <john@phrozen.org>2019-09-13 13:05:09 +0200
commitab2a2b080d4143bfbbd8584a39999ef998905dd2 (patch)
tree7e559eb48db407cd44270bc9b5d60e6cf921434e /lang/python/python3/files/python3-package-xml.mk
parentc8a86c8c8e1925eb7d84c52e702c4be5fc8ac76b (diff)
cgi-io: add download operation
Add a new `cgi-download` applet which allows to retrieve the contents of regular files or block devices. In order to initiate a transfer, a POST request in x-www-form-urlencoded format must be sent to the applet, with one field "sessionid" holding the login session and another field "path" containing the file path to download. Further optional fields are "filename" which - if present - will cause the download applet to set a Content-Dispostition header and "mimetype" which allows to let the applet respond with a specific type instead of the default "application/octet-stream". Below is an example for the required acl rules to grant download access to files or block devices: ubus call session grant '{ "ubus_rpc_session": "...", "scope": "cgi-io", "objects": [ [ "download", "read" ] ] }' ubus call session grant '{ "ubus_rpc_session": "...", "scope": "file", "objects": [ [ "/etc/config/*", "read" ], [ "/dev/mtdblock*", "read" ] ] }' Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lang/python/python3/files/python3-package-xml.mk')
0 files changed, 0 insertions, 0 deletions