diff --git a/src/ui/components/file-browser/context-menu.tsx b/src/ui/components/file-browser/context-menu.tsx index 6fa4fb07..ee81b996 100644 --- a/src/ui/components/file-browser/context-menu.tsx +++ b/src/ui/components/file-browser/context-menu.tsx @@ -212,7 +212,7 @@ export function FileBrowserContextMenu({ Download - {item.type === 'file' && ( + {(item.type === 'file' || item.type === 'version_stack') && ( onNewVersion(item)}> Create new version diff --git a/src/ui/components/file-browser/file-browser.tsx b/src/ui/components/file-browser/file-browser.tsx index 39d1596e..273ea34a 100644 --- a/src/ui/components/file-browser/file-browser.tsx +++ b/src/ui/components/file-browser/file-browser.tsx @@ -145,10 +145,11 @@ export function FileBrowser({ const share = await res.json() // Add assets to the new share link - await client.api.teams[':teamId'].shares[':shareId'].assets.$post({ + const assetsRes = await client.api.teams[':teamId'].shares[':shareId'].assets.$post({ param: { teamId, shareId: share.id }, json: { assetIds: items.map((i) => i.id!) }, }) + if (!assetsRes.ok) throw new Error('Failed to add assets to share link') return share },