fix: clarify that the bucket needs to be set to public for getPublicUrl() (#3821) (#3848)

This commit is contained in:
Beng Eu authored and GitHub committed 2021-11-10 13:10:00 +08:00
1 parent 1f101be1ff
commit ca35cbcb3e
2 files changed
+6 -4

No files matched your search

+1
View File
@@ -1002,6 +1002,7 @@ pages:
Retrieve URLs for assets in public buckets
title: 'from.getPublicUrl()'
notes: |
- The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.io](https://app.supabase.io), clicking the overflow menu on a bucket and choosing "Make public"
- Policy permissions required:
- `buckets` permissions: none
- `objects` permissions: none
+5 -4
View File
@@ -118,14 +118,14 @@ pages:
Other languages are built by the community and supported by Supabase.
## JavaScript
Via NPM
```bash
npm install @supabase/supabase-js
```
Find the source code on [GitHub](https://github.com/supabase/supabase-js).
Or via CDN
```js
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>
@@ -488,7 +488,7 @@ pages:
$ref: '@supabase/gotrue-js."GoTrueClient".GoTrueClient.update'
notes: |
User email: email updates will send an email to both the user's current and new email with a confirmation link.
User metadata: It's generally better to store user data in a table inside your public schema (i.e. `public.users`).
Use the `update()` method if you have data which rarely changes or is specific only to the logged in user.
examples:
@@ -1347,6 +1347,7 @@ pages:
title: 'from.getPublicUrl()'
$ref: '@supabase/storage-js."lib/StorageFileApi".StorageFileApi.getPublicUrl'
notes: |
- The bucket needs to be set to public, either via [updateBucket()](/docs/reference/javascript/storage-updatebucket) or by going to Storage on [app.supabase.io](https://app.supabase.io), clicking the overflow menu on a bucket and choosing "Make public"
- Policy permissions required:
- `buckets` permissions: none
- `objects` permissions: none