diff --git a/src/components/cases/documents-tab.tsx b/src/components/cases/documents-tab.tsx index 799be4e..d611cda 100644 --- a/src/components/cases/documents-tab.tsx +++ b/src/components/cases/documents-tab.tsx @@ -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/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