mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-13 17:26:22 +00:00
refactor: unify media asset downloads (#11717)
## Summary Unifies media asset download actions behind a single `downloadAssets(assets?)` API to avoid single and multi asset download path drift. ## Changes - **What**: Replaces `downloadAsset` and `downloadMultipleAssets` with `downloadAssets`, preserving no-arg media context fallback and explicit asset arrays. - **Dependencies**: None. ## Review Focus Download behavior for single-card, context-menu, and sidebar bulk actions should continue to use the same ZIP-export path for cloud multi-output jobs. Fixes #11715 ## Screenshots (if applicable) N/A ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11717-refactor-unify-media-asset-downloads-3506d73d3650810d8bcec9c0194e743d) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
@@ -327,7 +327,7 @@ const {
|
||||
} = useAssetSelection()
|
||||
|
||||
const {
|
||||
downloadMultipleAssets,
|
||||
downloadAssets,
|
||||
deleteAssets,
|
||||
addMultipleToWorkflow,
|
||||
openMultipleWorkflows,
|
||||
@@ -533,7 +533,7 @@ function handleContextMenuHide() {
|
||||
}
|
||||
|
||||
const handleBulkDownload = (assets: AssetItem[]) => {
|
||||
downloadMultipleAssets(assets)
|
||||
downloadAssets(assets)
|
||||
clearSelection()
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ const handleBulkExportWorkflow = async (assets: AssetItem[]) => {
|
||||
}
|
||||
|
||||
const handleDownloadSelected = () => {
|
||||
downloadMultipleAssets(selectedAssets.value)
|
||||
downloadAssets(selectedAssets.value)
|
||||
clearSelection()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user