Skip to content

Commit bac0aaf

Browse files
default to existing code path for safety
1 parent 794db13 commit bac0aaf

File tree

2 files changed

+453
-1
lines changed

2 files changed

+453
-1
lines changed

apps/web/app/(org)/dashboard/caps/components/UploadCapButton.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
} from "@/app/(org)/dashboard/caps/UploadingContext";
1717
import { UpgradeModal } from "@/components/UpgradeModal";
1818
import { useEffectMutation } from "@/lib/EffectRuntime";
19+
import { legacyUploadCap } from "./legacyUploadCap";
1920

2021
export const UploadCapButton = ({
2122
size = "md",
@@ -60,7 +61,12 @@ export const UploadCapButton = ({
6061
const file = e.target.files?.[0];
6162
if (!file || !user) return;
6263

63-
uploadCapMutation.mutate(file);
64+
// TODO: Enable this
65+
// uploadCapMutation.mutate(file);
66+
67+
const ok = await legacyUploadCap(file, folderId, setUploadStatus);
68+
if (ok) router.refresh();
69+
if (inputRef.current) inputRef.current.value = "";
6470
};
6571

6672
const isUploading = !!uploadStatus || uploadCapMutation.isPending;

0 commit comments

Comments
 (0)