StorageReference interface Stay organized with collections Save and categorize content based on your preferences.
Represents a reference to a Google Cloud Storage object. Developers can upload, download, and delete objects, as well as get/set object metadata.
Signature:
exportinterfaceStorageReferenceProperties
| 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 | FirebaseStorage | TheFirebaseStorage instance associated with this reference. |
Methods
| Method | Description |
|---|---|
| toString() | Returns a gs:// URL for this object in the formgs://<bucket>/<path>/<to>/<object> |
StorageReference.bucket
The name of the bucket containing this reference's object.
Signature:
bucket:string;StorageReference.fullPath
The full path of this object.
Signature:
fullPath:string;StorageReference.name
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'.
Signature:
name:string;StorageReference.parent
A reference pointing to the parent location of this reference, or null if this reference is the root.
Signature:
parent:StorageReference|null;StorageReference.root
A reference to the root of this object's bucket.
Signature:
root:StorageReference;StorageReference.storage
TheFirebaseStorage instance associated with this reference.
Signature:
storage:FirebaseStorage;StorageReference.toString()
Returns a gs:// URL for this object in the formgs://<bucket>/<path>/<to>/<object>
Signature:
toString():string;Returns:
string
The gs:// URL.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-22 UTC.