refactor: consolidate upload helpers
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import type { FolderEntry } from '@/lib/client-types'
|
||||
|
||||
export function revokeEntryUrls(entry: FolderEntry) {
|
||||
const urls = new Set<string>()
|
||||
|
||||
if (entry.modelUrl) urls.add(entry.modelUrl)
|
||||
Object.values(entry.assetUrls || {}).forEach((url) => urls.add(url))
|
||||
urls.forEach((url) => URL.revokeObjectURL(url))
|
||||
}
|
||||
Reference in New Issue
Block a user