diff --git a/bun.lockb b/bun.lockb index bb8b016..a6e8be9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/components/cases/documents-tab.tsx b/src/components/cases/documents-tab.tsx index 4f8c8ff..d611cda 100644 --- a/src/components/cases/documents-tab.tsx +++ b/src/components/cases/documents-tab.tsx @@ -27,7 +27,7 @@ import { DialogTitle, } from "@/components/ui/dialog"; -const MAX_BYTES = 50 * 1024 * 1024; +const MAX_BYTES = 150 * 1024 * 1024; export function CaseDocumentsTab({ caseId }: { caseId: string }) { const { user } = useAuth(); @@ -99,7 +99,7 @@ export function CaseDocumentsTab({ caseId }: { caseId: string }) { const sanitizeName = (n: string) => n.replace(/[^a-zA-Z0-9._-]/g, "_"); const uploadFile = async (file: File, folderPath: string) => { - if (file.size > MAX_BYTES) { toast.error(`${file.name}: too large (50MB max)`); return false; } + if (file.size > MAX_BYTES) { toast.error(`${file.name}: too large (150MB max)`); return false; } const storagePath = `${caseId}/${Date.now()}-${Math.random().toString(36).slice(2, 6)}-${sanitizeName(file.name)}`; const { error: upErr } = await supabase.storage.from("case-documents").upload(storagePath, file); if (upErr) { toast.error(`${file.name}: upload failed`, { description: upErr.message }); return false; } diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 94db69b..2c230ca 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -1046,3 +1046,12 @@ const rootRouteChildren: RootRouteChildren = { export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) ._addFileTypes() + +import type { getRouter } from './router.tsx' +import type { createStart } from '@tanstack/react-start' +declare module '@tanstack/react-start' { + interface Register { + ssr: true + router: Awaited> + } +} diff --git a/supabase/migrations/20260422173545_09f41704-0710-49b5-9a29-700609641581.sql b/supabase/migrations/20260422173545_09f41704-0710-49b5-9a29-700609641581.sql new file mode 100644 index 0000000..b097a5f --- /dev/null +++ b/supabase/migrations/20260422173545_09f41704-0710-49b5-9a29-700609641581.sql @@ -0,0 +1 @@ +UPDATE storage.buckets SET file_size_limit = 157286400 WHERE id IN ('case-documents', 'case-receipts', 'case-reports', 'generated-documents', 'message-attachments'); \ No newline at end of file