mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
chore: add update object function to the docs (#19156)
* chore: add update object function to the docs * Update python code snippet
This commit is contained in:
1 parent
3a41744af8
commit
fe1c676013
1 file changed
+15
@@ -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: |
|
||||
|
||||
Reference in new issue
Block a user