Fixed: root breadcrumb move file issue

This commit is contained in:
Abhishek Kumar
2025-08-04 12:25:56 +05:30
parent a201321747
commit 679062cf0c
4 changed files with 93 additions and 81 deletions

View File

@@ -166,11 +166,14 @@ export function useCreateFolder() {
});
}
export const uploadMutationKey = ["uploadFile"];
export function useUploadFile() {
const queryClient = useQueryClient();
const { clientPromise } = useAccountProvider();
return useMutation({
// mutationFn: async ({ file, parentId, onProgress }: UploadFileParams) => {
mutationKey: uploadMutationKey,
mutationFn: async ({ file, parentId }: UploadFileSchema) => {
const BASE_FILE_CLIENT = await getBaseFileClient(clientPromise);
const response = await handleUnauthorizedError(