--- title: Cloud Storage description: Installation and getting started with Storage. icon: //static.invertase.io/assets/firebase/cloud-storage.svg next: /app/usage previous: /messaging/server-integration --- # Installation This module requires that the `@react-native-firebase/app` module is already setup and installed. To install the "app" module, view the [Getting Started](/) documentation. ```bash # Install & setup the app module yarn add @react-native-firebase/app # Install the storage module yarn add @react-native-firebase/storage # If you're developing your app using iOS, run this command cd ios/ && pod install ``` If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project, you can follow the manual installation steps for [iOS](/storage/usage/installation/ios) and [Android](/storage/usage/installation/android). # What does it do Storage is built for app developers who need to store and serve user-generated content, such as photos or videos. Your data is stored in a Google Cloud Storage bucket, an exabyte scale object storage solution with high availability and global redundancy. Storage lets you securely upload these files directly from mobile devices, handling spotty networks with ease. # Usage Your files are stored in a Google Cloud Storage bucket. The files in this bucket are presented in a hierarchical structure, just like a file system. By creating a reference to a file, your app gains access to it. These references can then be used to upload or download data, get or update metadata or delete the file. A reference can either point to a specific file or to a higher level node in the hierarchy. The Storage module also provides support for multiple buckets. You can view your buckets on the [Firebase Console](https://console.firebase.google.com/project/_/storage/files). ## Creating a reference A reference is a local pointer to some file on your bucket. This can either be a file which already exists, or one which does not exist yet. To create a reference, use the `ref` method: ```js import storage from '@react-native-firebase/storage'; const reference = storage().ref('black-t-shirt-sm.png'); ``` You can also specify a file located in a deeply nested directory: ```js const reference = storage().ref('/images/t-shirts/black-t-shirt-sm.png'); ``` ## Upload a file To upload a file directly from the users device, the `putFile` method on a reference accepts a string path to the file on the users device. For example, you may be creating an app which uploads users photos. The React Native Firebase library provides [Utils](/app/utils) to help identify device directories: ```jsx import React, { useEffect } from 'react'; import { View, Button } from 'react-native'; import { utils } from '@react-native-firebase/app'; import storage from '@react-native-firebase/storage'; function App() { // create bucket storage reference to not yet existing image const reference = storage().ref('black-t-shirt-sm.png'); return (