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:
Dante
2026-04-29 13:50:45 +09:00
committed by GitHub
parent 1c541d8577
commit 9df4e02189
6 changed files with 179 additions and 58 deletions

View File

@@ -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()
}