mirror of
https://github.com/Since-3/since3-portal.git
synced 2026-10-12 20:51:17 +00:00
added document uploading
This commit is contained in:
parent
89ab4a713a
commit
4d42a172a5
22 changed files with 2369 additions and 17 deletions
|
|
@ -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';
|
||||
Loading…
Add table
Add a link
Reference in a new issue