diff --git a/web/service/use-sandbox-file.ts b/web/service/use-sandbox-file.ts index 030205860d..fa494de1f4 100644 --- a/web/service/use-sandbox-file.ts +++ b/web/service/use-sandbox-file.ts @@ -41,7 +41,9 @@ export function useSandboxFileDownloadUrl( path: string | undefined, ) { return useQuery({ - queryKey: ['sandboxFileDownloadUrl', appId, path], + queryKey: consoleQuery.sandboxFile.downloadFile.queryKey({ + input: { params: { appId: appId! }, body: { path: path! } }, + }), queryFn: () => consoleClient.sandboxFile.downloadFile({ params: { appId: appId! }, body: { path: path! }, @@ -56,6 +58,9 @@ export function useInvalidateSandboxFiles() { queryClient.invalidateQueries({ queryKey: consoleQuery.sandboxFile.listFiles.key(), }) + queryClient.invalidateQueries({ + queryKey: consoleQuery.sandboxFile.downloadFile.key(), + }) }, [queryClient]) }