mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
Add extensions core
This commit is contained in:
12
src/scripts/extensions/core/uploadImage.js
Normal file
12
src/scripts/extensions/core/uploadImage.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { app } from "../../scripts/app.js";
|
||||
|
||||
// Adds an upload button to the nodes
|
||||
|
||||
app.registerExtension({
|
||||
name: "Comfy.UploadImage",
|
||||
async beforeRegisterNodeDef(nodeType, nodeData, app) {
|
||||
if (nodeData?.input?.required?.image?.[1]?.image_upload === true) {
|
||||
nodeData.input.required.upload = ["IMAGEUPLOAD"];
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user