mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 13:59:54 +00:00
14 lines
397 B
TypeScript
14 lines
397 B
TypeScript
import { app } from "../../scripts/app";
|
|
import { ComfyNodeDef } from "@/types/apiTypes";
|
|
|
|
// Adds an upload button to the nodes
|
|
|
|
app.registerExtension({
|
|
name: "Comfy.UploadImage",
|
|
async beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef, app) {
|
|
if (nodeData?.input?.required?.image?.[1]?.image_upload === true) {
|
|
nodeData.input.required.upload = ["IMAGEUPLOAD"];
|
|
}
|
|
},
|
|
});
|