The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
storage: add api-examples
Inian Parameshwaranbe00f7ba95aa
diff --git a/www/data/products/storage/api-examples.js b/www/data/products/storage/api-examples.jsnew file mode 100644index 00000000000..77b299d4be7--- /dev/null+++ b/www/data/products/storage/api-examples.js@@ -0,0 +1,34 @@+export default [+ {+ lang: 'js',+ title: 'Upload a file',+ code: `++ const { data, error } = await supabase+ .storage+ .from('avatars-bucket')+ .uploadFile('avatar.png', avatarFile)++++++ `,+ },+ {+ lang: 'js',+ title: 'Download a file',+ code: `+ const { data, error } = await supabase+ .storage+ .from('avatars-bucket')+ .downloadFile('avatar.png')+++++++ `,+ },+]diff --git a/www/pages/storage/Storage.tsx b/www/pages/storage/Storage.tsxindex 3bc6e3abe6c..13532bc77cb 100644--- a/www/pages/storage/Storage.tsx+++ b/www/pages/storage/Storage.tsx@@ -23,7 +23,7 @@ import APISection from '~/components/Sections/APISection'import FeatureColumn from '~/components/FeatureColumn'-import ApiExamples from 'data/products/database/api-examples'+import ApiExamples from 'data/products/storage/api-examples'import StoragePermissionsData from 'data/products/storage/permissions-examples'import CTABanner from '~/components/CTABanner'@@ -57,7 +57,7 @@ function AuthPage() {</span>,]}subheader={[- 'An open source scalable File store with unlimited scalability, for any file type.',+ 'An open source Object store service with unlimited scalability, for any file type.','With custom policies and permissions that are familiar and easy to implement.',]}image={[@@ -126,10 +126,10 @@ function AuthPage() {<SectionContainer className="pt-16"><div className="mb-16 block"><Typography.Title>Sleek dashboard for managing your media</Typography.Title>- <p className="text-lg">A complete File Explorer so that any of your team can use.</p>+ <p className="text-lg">A complete Object Explorer so that any of your team can use.</p><p>- Drag and drop uploading, moving files, and multiple file selection. As easy as working- on your desktop.+ Drag and drop uploading, moving objects, and multiple object selection. As easy as+ working on your desktop.</p></div><ImageCarousel@@ -215,8 +215,8 @@ function AuthPage() {Using Postgres Row Level Security to create File access rules.</p><p>- Supabase Storage is built around Postgres so that you can use any combination of SQL, Postgres functions,- and even your own metadata to write policies.+ Supabase Storage is built around Postgres so that you can use any combination+ of SQL, Postgres functions, and even your own metadata to write policies.</p><Buttonsize="small"