secubox-openwrt/package/secubox/luci-app-streamlit/root/usr/share/rpcd/acl.d/luci-app-streamlit.json
CyberMind-FR 0083513cdc fix(streamlit): Add chunked upload to bypass uhttpd 64KB JSON limit and support top-level .py apps
uhttpd-mod-ubus silently rejects JSON-RPC requests >64KB with "Parse error",
causing uploads of .py files >48KB to fail with "No related RPC reply".

- Add chunked upload (upload_chunk + upload_finalize) that splits base64
  content into 40KB pieces sent sequentially, then reassembles server-side
- Frontend auto-selects chunked upload when content exceeds 40KB
- Stop polling during upload to prevent RPC batch conflicts
- RPCD handlers use cat-to-tempfile instead of shell variables for stdin
  to avoid BusyBox argument size limits
- Container startup script handles top-level .py files (not just subdirs)
- streamlitctl cmd_instance_start also handles top-level .py files
- Add upload_chunk and upload_finalize to ACL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:16:47 +01:00

32 lines
837 B
JSON

{
"luci-app-streamlit": {
"description": "Grant access to Streamlit Platform management",
"read": {
"ubus": {
"luci.streamlit": [
"get_status", "get_config", "get_logs",
"list_apps", "get_app", "get_install_progress",
"list_instances",
"get_gitea_config", "gitea_list_repos"
]
},
"uci": ["streamlit"]
},
"write": {
"ubus": {
"luci.streamlit": [
"save_config", "start", "stop", "restart",
"install", "uninstall", "update",
"add_app", "remove_app", "set_active_app", "upload_app",
"upload_chunk", "upload_finalize",
"preview_zip", "upload_zip",
"add_instance", "remove_instance", "enable_instance", "disable_instance",
"rename_app", "rename_instance",
"save_gitea_config", "gitea_clone", "gitea_pull"
]
},
"uci": ["streamlit"]
}
}
}