MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / dragdrop.js

File dragdrop.js

javascript/dragdrop.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// allows drag-dropping files into gradio image elements, and also pasting images from clipboard
2
3function isValidImageList(files) {
4 return files && files?.length === 1 && ['image/png', 'image/gif', 'image/jpeg'].includes(files[0].type);

Callers

nothing calls this directly

Calls 11

eventHasFilesFunction · 0.85
dragDropTargetIsPromptFunction · 0.85
isURLFunction · 0.85
get_tab_indexFunction · 0.85
gradioAppFunction · 0.85
dropReplaceImageFunction · 0.85
isValidImageListFunction · 0.85
uiElementIsVisibleFunction · 0.85
uiElementInSightFunction · 0.85
sortMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected