The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/storage > StorageReference

StorageReference interface

Represents a reference to a Google Cloud Storage object. Developers can upload, download, and delete objects, as well as get/set object metadata.

Signature:

export interface StorageReference 

Properties

Property Type Description
bucket string The name of the bucket containing this reference's object.
fullPath string The full path of this object.
name string The short name of this object, which is the last component of the full path. For example, if fullPath is 'full/path/image.png', name is 'image.png'.
parent StorageReference | null A reference pointing to the parent location of this reference, or null if this reference is the root.
root StorageReference A reference to the root of this object's bucket.
storage StorageService The StorageService associated with this reference.

Methods

Method Description
toString() Returns a gs:// URL for this object in the form gs://<bucket>/<path>/<to>/<object>