The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Images and optimizations.
Ramiro Nuñez Dosiod70e70e8421d
diff --git a/apps/www/_blog/2023-08-01-react-native-file-upload.mdx b/apps/www/_blog/2023-08-01-react-native-file-upload.mdxindex c4258c0f69a..d243ecf1370 100644--- a/apps/www/_blog/2023-08-01-react-native-file-upload.mdx+++ b/apps/www/_blog/2023-08-01-react-native-file-upload.mdx@@ -1,9 +1,9 @@----title: 'React Native File Upload with Supabase Storage'-description: WIP+title: 'React Native file upload with Supabase Storage'+description: Learn how to implement authentication and file upload in a React Native app.author: simon_grimm-image: WIP-thumb: WIP+image: 2023-08-01-react-native-storage/react-native-storage.png+thumb: 2023-08-01-react-native-storage/react-native-storage.pngtags:- react-native- storage@@ -11,11 +11,11 @@ date: '2023-08-01'toc_depth: 2----If you want to upload files from your React Native app, you need a backend to store the files. [Supabase Storage](https://supabase.com/docs/guides/storage) is a great choice for this as it provides a simple API to upload files, and we can easily combine this with authentication to build a powerful app.+If you want to upload files from your React Native app, you need a backend to store the files, [Supabase Storage](https://supabase.com/docs/guides/storage) is a great choice for this as it provides a simple API to upload files, and we can easily combine this with authentication to build a powerful app.This means you can quickly build your own image-sharing app, a file-sharing app, or any other app that needs to upload files to a backend!-+In this tutorial you will learn to:@@ -26,35 +26,35 @@ In this tutorial you will learn to:You can also directly check out the [full source code on Github](https://github.com/saimon24/react-native-resumable-upload-supabase) so you can get started with Supabase fast!-Before we get into the app, let's quickly [start a new Supabase project](https://supabase.com/).+Before we get into the app, let's quickly [start a new Supabase project](https://supabase.com/dashboard).## Creating the Supabase Project-To use authentication and storage we need a new Supabase project. If you don't have a Supabase account yet, you can [get started for free](https://supabase.com/)!+To use authentication and storage we need a new Supabase project. If you don't have a Supabase account yet, you can [get started for free](https://supabase.com/dashboard)!In your dashboard, click "New Project" and leave it to the default settings, but make sure you keep a copy o your Database password!-+After a minute your project should be ready, and we can configure the authentication and storage.-### Setting up Authentication+## Setting up AuthenticationAuthentication will be enabled by default, but we want to turn off email confirmation for this tutorial.Select **Authentication** from the menu, go to the **Providers** section, and expand Email.-+Here you can disable the confirmation email, and apply other changes later if you want to!-### Setting up Storage+## Setting up StorageNow we want to create a **bucket** under storage where we will upload our files, and also add some security rules to protect the files of a user.First, select **Storage** from the menu, then click **New bucket** and call it `files`.-+Make sure that this is not a public bucket, otherwise, even unauthenticated users can upload or read the files!@@ -245,7 +245,7 @@ export default Login;There's nothing fancy going on here, but this is all we need to use Supabase Authentication in our app!-+You can try it out right now and create a new user account or sign in with an existing one and log the values to the console to see what's going on.@@ -478,7 +478,7 @@ export default list;This should give us a nice and clean UI.-+Now we can implement the image picker and upload the selected image to Supabase Storage.@@ -554,7 +554,7 @@ Now let's use this component in our `list.tsx` file to render the list of imagesDon't forget to also include the import to the `ImageItem` component!-+Finally, we can also include the delete functionality by adding the following code to the `list.tsx`:diff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/email-auth.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/email-auth.pngnew file mode 100644index 00000000000..77c4dbc3f6fBinary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/email-auth.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/files-page.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/files-page.pngnew file mode 100644index 00000000000..400c4638c82Binary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/files-page.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/login-page.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/login-page.pngnew file mode 100644index 00000000000..191a3c391f8Binary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/login-page.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/new-bucket.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/new-bucket.pngnew file mode 100644index 00000000000..7c036bdc399Binary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/new-bucket.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/new-project.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/new-project.pngnew file mode 100644index 00000000000..7207bca170dBinary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/new-project.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/react-native-storage.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/react-native-storage.pngnew file mode 100644index 00000000000..452144f645aBinary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/react-native-storage.png differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-file-upload-react-native.gif b/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-file-upload-react-native.gifnew file mode 100644index 00000000000..27b87cba44bBinary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-file-upload-react-native.gif differdiff --git a/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-storage-files.png b/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-storage-files.pngnew file mode 100644index 00000000000..8ef9944ab74Binary files /dev/null and b/apps/www/public/images/blog/2023-08-01-react-native-storage/supabase-storage-files.png differ