ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Introducing Directory Listing Capability to ComfyUI

Open johnbenac opened this issue 11 months ago • 1 comments

Description: This pull request introduces a new feature to ComfyUI, enabling API support for directory listing. This new functionality allows users to query the contents of the input, output, and temp directories, as well as their subdirectories, directly through a RESTful API endpoint. It represents a significant step forward in providing developers and users with the tools necessary for managing and navigating files and directories within ComfyUI, particularly for those building GUIs and client applications that interact with ComfyUI assets.

Key Features: Directory and Subdirectory Listing: Users can now query the contents of specified directories and navigate through their subdirectories using a simple API call, improving file management and accessibility. Security First Approach: The implementation strictly validates user requests to ensure access is confined within predefined directory paths, enhancing the security posture of the application. Ease of Use for Developers: With the introduction of this API endpoint, developers gain a straightforward method to integrate ComfyUI's file management capabilities into their applications, facilitating the development of rich client-side experiences. Use Case: This feature is invaluable for developers and users needing a robust method to access and utilize assets from previous sessions within their applications. It supports a wide range of applications, from content creation tools that require access to a library of images, to complex project management interfaces that organize outputs into structured directories.

Here is accessing the contents of the output folder: image And here is accessing a subdirectory or arbitrary depth in the inputs folder. image

johnbenac avatar Mar 21 '24 07:03 johnbenac

Can I improve this to make it more acceptable?

johnbenac avatar Apr 13 '24 16:04 johnbenac