@aaqu/fromcubes-assets 0.1.3

Fromcubes Assets: static files for portals, managed from a Node-RED sidebar

npm install @aaqu/fromcubes-assets

@aaqu/fromcubes-assets

npm version license Sponsor

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, .svg and .js are served as downloads with Content-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:

Sponsor on GitHub

License

Apache-2.0

Node Info

Version: 0.1.3
Updated 2 weeks, 3 days ago
License: Apache-2.0
Rating: not yet rated

Categories

Actions

Rate:

Downloads

530 in the last week

Keywords

  • node-red
  • fromcubes
  • assets
  • static
  • files

Maintainers