From 85cec354282c1f1c1c74d9a601c60a27998808fb Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 17:35:49 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/cases/documents-tab.tsx | 2 +- .../20260422173545_09f41704-0710-49b5-9a29-700609641581.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 supabase/migrations/20260422173545_09f41704-0710-49b5-9a29-700609641581.sql 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