@aaqu/fromcubes-assets 0.1.3
Fromcubes Assets: static files for portals, managed from a Node-RED sidebar
@aaqu/fromcubes-assets
Static files for @aaqu/fromcubes-react
portals — 3D models, textures, fonts, images — a Node-RED plugin.
- Sidebar tab "Portal Assets" in the editor: upload (also drag & drop), folders, rename, move, download, delete.
- Files live in
<userDir>/fromcubes/public/and are served publicly at<httpNodeRoot>/fromcubes/public/<path>, so a portal loads them with e.g.useGLTF("/fromcubes/public/models/robot.glb").
Install
cd ~/.node-red
npm install @aaqu/fromcubes-assets
# restart Node-RED
Requires @aaqu/fromcubes-react (a peer dependency).
Security
- Every change goes through the editor's admin API: Node-RED's admin auth
(
portal-react.write), a CSRF header check and a rate limit. - Paths are validated segment by segment;
.., hidden files, Windows-reserved names and symlinks escaping the folder are refused. .html,.svgand.jsare served as downloads withContent-Security-Policy: default-src 'none', never rendered.- Errors on the public route say only
Not found/Forbidden/Bad request— never where files live on disk. - Limits: 100 MB per upload, 500 MB and 1000 files in total, 10 folder levels.
Support
fromcubes is built and maintained by one person. If it saves you time, consider sponsoring its development:
License
Apache-2.0