Index
Properties
bucket
The name of the bucket containing this reference's object.
fullPath 
					
					The full path of this object.
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'.
parent
A reference pointing to the parent location of this reference, or null if this reference is the root.
root
A reference to the root of this reference's bucket.
storage
The storage service associated with this reference.
Methods
child
- 
							Returns a reference to a relative path from this reference. Parameters- 
									path: stringThe relative path from this reference. Leading, trailing, and consecutive slashes are removed. 
 Returns ReferenceThe reference to the given path. 
- 
									
delete
- 
							Deletes the object at this reference's location. Returns Promise<void>A Promise that resolves if the deletion succeeded and rejects if it failed, including if the object didn't exist. 
getDownloadURL 
					- 
							Fetches a long lived download URL for this object. Returns Promise<string>A Promise that resolves with the download URL or rejects if the fetch failed, including if the object did not exist. 
getMetadata 
					- 
							Fetches metadata for the object at this location, if one exists. Returns Promise<FullMetadata>A Promise that resolves with the metadata, or rejects if the fetch failed, including if the object did not exist. 
list
- 
							List items (files) and prefixes (folders) under this storage reference. List API is only available for Firebase Rules Version 2. GCS is a key-blob store. Firebase Storage imposes the semantic of '/' delimited folder structure. Refer to GCS's List API if you want to learn more. To adhere to Firebase Rules's Semantics, Firebase Storage does not support objects whose paths end with "/" or contain two consecutive "/"s. Firebase Storage List API will filter these unsupported objects. list()may fail if there are too many unsupported objects in the bucket.Parameters- 
									Optional options: ListOptionsSee ListOptionsfor details.
 Returns Promise<ListResult>A Promise that resolves with the items and prefixes. prefixescontains references to sub-folders anditemscontains references to objects in this folder.nextPageTokencan be used to get the rest of the results.
- 
									
listAll 
					- 
							List all items (files) and prefixes (folders) under this storage reference. This is a helper method for calling list()repeatedly until there are no more results. The default pagination size is 1000.Note: The results may not be consistent if objects are changed while this operation is running. Warning: listAllmay potentially consume too many resources if there are too many results.Returns Promise<ListResult>A Promise that resolves with all the items and prefixes under the current storage reference. prefixescontains references to sub-directories anditemscontains references to objects in this folder.nextPageTokenis never returned.
put
- 
							Uploads data to this reference's location. Parameters- 
									data: Blob | Uint8Array | ArrayBufferThe data to upload. 
- 
									Optional metadata: UploadMetadataMetadata for the newly uploaded object. 
 Returns UploadTaskAn object that can be used to monitor and manage the upload. 
- 
									
putString 
					- 
							Uploads string data to this reference's location. Parameters- 
									data: stringThe string to upload. 
- 
									Optional format: StringFormatThe format of the string to upload. 
- 
									Optional metadata: UploadMetadataMetadata for the newly uploaded object. 
 Returns UploadTask
- 
									
toString 
					- 
							Returns a gs:// URL for this object in the form gs://<bucket>/<path>/<to>/<object>Returns stringThe gs:// URL. 
updateMetadata 
					- 
							Updates the metadata for the object at this location, if one exists. Parameters- 
									metadata: SettableMetadataThe new metadata. Setting a property to 'null' removes it on the server, while leaving a property as 'undefined' has no effect. 
 Returns Promise<FullMetadata>A Promise that resolves with the full updated metadata or rejects if the updated failed, including if the object did not exist. 
- 
									
Represents a reference to a Google Cloud Storage object. Developers can upload, download, and delete objects, as well as get/set object metadata.