Skip to content

Allow POST /userdata/{file} endpoint to return full file info#5446

Merged
comfyanonymous merged 5 commits intomasterfrom
path_refactor
Nov 4, 2024
Merged

Allow POST /userdata/{file} endpoint to return full file info#5446
comfyanonymous merged 5 commits intomasterfrom
path_refactor

Conversation

@huchenlei
Copy link
Copy Markdown
Contributor

@huchenlei huchenlei commented Oct 31, 2024

This PR makes POST /userdata/{file} and POST /userdata/{file}/move/{dest} accept an extra optional param full_info so that the updated full file info (size and last modified timestamp) is returned to the caller. Without the param, the return value would be the file path string.

This can save the frontend an extra GET /userdata call to update the size and last modified info.

@huchenlei huchenlei added the Feature A new feature to add to ComfyUI. label Oct 31, 2024
@huchenlei huchenlei marked this pull request as ready for review October 31, 2024 21:32
@comfyanonymous comfyanonymous merged commit c49025f into master Nov 4, 2024
@comfyanonymous comfyanonymous deleted the path_refactor branch November 4, 2024 18:57
tiangles pushed a commit to diffus-me/ComfyUI that referenced this pull request Nov 29, 2024
…y-Org#5446)

* Refactor listuserdata

* Full info param

* Add tests

* Fix mock

* Add full_info support for move user file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature to add to ComfyUI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants