From c43cd287bb8c6ff05af9262ccb9a5488d2b59380 Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Fri, 14 Nov 2025 15:57:43 +0900 Subject: [PATCH] fix: Hide delete button for input assets in OSS and fix cloud download (#6697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fix delete button visibility for input assets in OSS environment and resolve 404 error when downloading assets in cloud. ## Changes ### 1. Improved Delete Button Visibility Logic - **Problem**: In OSS environment, input files are sourced from local folders and cannot be deleted - **Solution**: Added `shouldShowDeleteButton` computed property to conditionally hide delete buttons - **Impact**: - Input tab + Cloud: Delete button shown ✅ - Input tab + OSS: Delete button hidden ❌ - Output tab (all environments): Delete button shown ✅ ### 2. Fixed Cloud Download 404 Error - **Problem**: Downloading files from imported tab in cloud returned 404 error for `/api/view` endpoint - **Root Cause**: In cloud environment, files are stored in external storage (e.g., GCS) and `/api/view` endpoint is not available - **Solution**: - Cloud: Use `preview_url` directly for downloads - OSS/localhost: Continue using `/api/view` endpoint as before - Applied the same logic to both single and bulk download operations ## Test Plan - [ ] Verify delete button is hidden in input tab on OSS environment - [ ] Verify delete button is shown in input tab on cloud environment - [ ] Verify file downloads work correctly in cloud for both input and output tabs - [ ] Verify file downloads work correctly in OSS for output tab 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude --- .../sidebar/tabs/AssetsSidebarTab.vue | 14 ++++++-- .../composables/useMediaAssetActions.ts | 32 ++++++++++++++----- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/components/sidebar/tabs/AssetsSidebarTab.vue b/src/components/sidebar/tabs/AssetsSidebarTab.vue index d755c4fa1..126b915c4 100644 --- a/src/components/sidebar/tabs/AssetsSidebarTab.vue +++ b/src/components/sidebar/tabs/AssetsSidebarTab.vue @@ -82,7 +82,7 @@ :selected="isSelected(item.id)" :show-output-count="shouldShowOutputCount(item)" :output-count="getOutputCount(item)" - :show-delete-button="!isInFolderView" + :show-delete-button="shouldShowDeleteButton" @click="handleAssetSelect(item)" @zoom="handleZoomClick(item)" @output-count-click="enterFolderView(item)" @@ -94,7 +94,7 @@