A ComfyUI custom node that adds HTTP API endpoints for media (output/input/temp) so the WorkflowUI application can delete files on the ComfyUI server, browse media, and serve images with optional previews—without adding any graph nodes to the ComfyUI UI.
⚠️ This custom node is a plugin for: WorkflowUI
WorkflowUIPlugin folder into your ComfyUI custom_nodes directory:“`
ComfyUI/custom_nodes/WorkflowUIPlugin/
├── __init__.py
├── routes.py
├── version_info.py
└── README.md
“`
| Method | Path | Description |
|——–|——|————-|
| POST | /delete | Delete a file by filename / subfolder / type. Same as namespaced path below. |
| POST | /workflowui/media/delete | Delete a file (JSON body: filename, optional subfolder, type). |
| GET | /workflowui/media/view | Serve file bytes (images, video, audio). Query: filename, subfolder, type; optional preview=webp \| jpeg \| 256 for image previews. |
| GET | /workflowui/media/list | Flat list of files in a folder (JSON: filename, size, mtime). Query: type, subfolder. |
| GET | /workflowui/media/tree | One-level tree: folders and files for browsing. Query: type, subfolder. |
| GET | /workflowui/media/capabilities | Returns supported features (e.g. workflowui_plugin, delete, list, tree, view, view_preview). |
| GET | /workflowui/version_info | Plugin version and list of installed custom node modules/versions for run metadata. |
Request body (JSON):
filename (required) — e.g. ComfyUI_00001_.pngsubfolder (optional) — e.g. "" or "audio"type (optional) — "output" (default), "input", or "temp"Response: 200 with {"ok": true} on success; 400 / 404 / 500 with {"ok": false, "error": "..."} on failure.
Cache-Control: public, max-age=3600.&preview=webp, &preview=jpeg, or &preview=256 (or any size 64–2048) for a resized/compressed image. Non-image files ignore preview and return the original.filename, size, mtime (newest first).folders (subfolder names) and files (with filename, size, mtime). Use for file-manager style browsing.folder_paths.get_directory_by_type().subfolder and filename are validated to prevent directory traversal (.., path separators in filename).folder_paths.get_directory_by_type() and PromptServer.instance.routes.POST /delete with the same JSON shape; no backend change required when the plugin is installed.See repository license.