---
title: "React Native file upload with Supabase Storage"
description: "A React Native app built with Expo SDK 49 and Expo Router v2 can sign users in with Supabase Auth and upload images to a private Supabase Storage bucket."
url: "https://swe.quest/articles/react-native-file-upload-with-supabase-storage-8dde735f893aa350"
canonical: "https://supabase.com/blog/react-native-storage"
source: "Supabase"
published: "2023-08-01"
difficulty: "medium"
kind: "How-to"
reading_minutes: 14
tags: ["react","mobile","identity-auth","storage-systems"]
---

# React Native file upload with Supabase Storage

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-08-01, 14 min read, How-to. Original: [https://supabase.com/blog/react-native-storage](https://supabase.com/blog/react-native-storage)

## Summary

A React Native app built with Expo SDK 49 and Expo Router v2 can sign users in with Supabase Auth and upload images to a private Supabase Storage bucket. A Postgres storage policy restricts each user to a folder named after their auth UID. The Supabase client persists sessions in AsyncStorage, and an AuthProvider context built on onAuthStateChange redirects between login and protected routes. Upload works by reading the image-picker URI as base64 with expo-file-system, decoding it to an ArrayBuffer and calling storage upload().

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Storage systems](https://swe.quest/tags/storage-systems.md) (Infrastructure)

## Prerequisites

- React Native basics ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- React hooks and context ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))

## Keywords

Supabase Storage, Supabase Auth, React Native, Expo Router, Expo, expo-image-picker, AsyncStorage

## Related posts

- [Getting started with React Native authentication](https://swe.quest/articles/getting-started-with-react-native-authentication-41c0c8f4add48c30.md): Supabase · 2023-11-16 · Medium · 9 min read · Identity & auth, Mobile, React, TypeScript
  Supabase Auth can be wired into an Expo/React Native app by configuring supabase-js with AsyncStorage for session persistence and disabling URL session detection.
- [Offline-first React Native Apps with Expo, WatermelonDB, and Supabase](https://swe.quest/articles/offline-first-react-native-apps-with-expo-watermelondb-and-supabase-1f52e6fbab692dbe.md): Supabase · 2023-10-08 · Medium · 7 min read · Local-first & sync, Mobile, PostgreSQL, React
  An offline-first React Native/Expo app can use WatermelonDB (SQLite-based, last-write-wins sync) as its local store and sync to Supabase Postgres through two RPC calls: a \`push\` function that applies client changesets and a \`pull\` function that returns all changes since the last sync timestamp.
- [Storage is now available in Supabase](https://swe.quest/articles/storage-is-now-available-in-supabase-a17d1a6604548758.md): Supabase · 2021-03-30 · Medium · 7 min read · Storage systems, PostgreSQL, Identity & auth, System design, TypeScript
  Supabase Storage is an object store built as a custom TypeScript/Fastify API server behind Kong, with object metadata and access policies kept in each project's Postgres database and objects stored in S3.
- [Supabase Auth: SSO, Mobile, and Server-side support](https://swe.quest/articles/supabase-auth-sso-mobile-and-server-side-support-6a2bc9b0f4a5ef26.md): Supabase · 2023-04-13 · Medium · 7 min read · Identity & auth, PostgreSQL, Multi-tenancy, Mobile
  Supabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS.
- [supabase-js v2](https://swe.quest/articles/supabase-js-v2-f87cba2e3b41f9e9.md): Supabase · 2022-08-16 · Medium · 5 min read · JavaScript, TypeScript, API design, Identity & auth, PostgreSQL
  supabase-js v2 brings incremental quality-of-life changes over v1.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
