From fe1c676013eca300e2d755f570d33512f22ded7b Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Fri, 1 Dec 2023 08:28:56 +0000 Subject: [PATCH] chore: add update object function to the docs (#19156) * chore: add update object function to the docs * Update python code snippet --- spec/supabase_py_v2.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/supabase_py_v2.yml b/spec/supabase_py_v2.yml index 77b3a75dc92..382954b9867 100644 --- a/spec/supabase_py_v2.yml +++ b/spec/supabase_py_v2.yml @@ -1940,6 +1940,21 @@ functions: with open(filepath, 'rb') as f: supabase.storage.from_("testbucket").upload(file=f,path=path_on_supastorage, file_options={"content-type": "audio/mpeg"}) ``` + - id: from-update + title: from_.update() + notes: | + - RLS policy permissions required: + - `buckets` table permissions: none + - `objects` table permissions: `update` and `select` + - Refer to the [Storage guide](/docs/guides/storage/security/access-control) on how access control works + examples: + - id: update-file + name: Update file + code: | + ```python + with open(filepath, 'rb') as f: + supabase.storage.from_("bucket_name").update(file=f, path=path_on_supastorage, file_options={"cache-control": "3600", "upsert": "true"}) + ``` - id: from-move title: 'from_.move()' notes: |