mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 05:32:02 +00:00
feat: add upload dropzone, library select, and 2-step confirm to missing media
- Upload dropzone with drag & drop, file type validation, event propagation guard - Use from Library dropdown with image/video thumbnail previews - 2-step confirm flow: select/upload → status card → checkmark to apply - Single node shows node display name; multiple nodes show filename with count - Extract MIME type constants to shared mediaUploadUtil.ts (single source) - Locate button visible only for single-node items
This commit is contained in:
@@ -11,8 +11,10 @@ import { isImageUploadInput } from '@/types/nodeDefAugmentation'
|
||||
import { createAnnotatedPath } from '@/utils/createAnnotatedPath'
|
||||
import { addToComboValues } from '@/utils/litegraphUtil'
|
||||
|
||||
const ACCEPTED_IMAGE_TYPES = 'image/png,image/jpeg,image/webp'
|
||||
const ACCEPTED_VIDEO_TYPES = 'video/webm,video/mp4'
|
||||
import {
|
||||
ACCEPTED_IMAGE_TYPES,
|
||||
ACCEPTED_VIDEO_TYPES
|
||||
} from '@/utils/mediaUploadUtil'
|
||||
|
||||
const isImageFile = (file: File) => file.type.startsWith('image/')
|
||||
const isVideoFile = (file: File) => file.type.startsWith('video/')
|
||||
|
||||
Reference in New Issue
Block a user