added document uploading

This commit is contained in:
Rajpreet0 2026-09-29 16:15:28 +02:00
parent 89ab4a713a
commit 4d42a172a5
22 changed files with 2369 additions and 17 deletions

View file

@ -0,0 +1,12 @@
-- Dokumente: Upload-Grenzen und Absicherung des Storage-Pfads
-- Ein Dokument darf nur auf eine Datei im Storage-Ordner des eigenen Clients zeigen.
-- Sonst könnte ein Client einen Datensatz auf den Pfad eines anderen Clients anlegen.
alter table public.documents
add constraint documents_storage_path_matches_client
check (split_part(storage_path, '/', 1) = client_id::text);
-- Max. 50 MB pro Datei (Supabase-Standardlimit im Free-Plan)
update storage.buckets
set file_size_limit = 52428800
where id = 'client-documents';