StorageReference class
StorageReference is a reference to a Google Cloud Storage object. It is possible to upload, download, and delete objects, as well as get or set the object metadata.
See: firebase.google.com/docs/reference/js/firebase.storage.Reference
Properties
- bucket → String
-
The name of the bucket.
no setter
- fullPath → String
-
The full path.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsObject → ReferenceJsImpl
-
JS object.
finalinherited
- name → String
-
The short name. Which is the last component of the full path.
no setter
- parent → StorageReference
-
The reference to the parent location of this reference.
It is
null
in case of root StorageReference.no setter - root → StorageReference
-
The reference to the root of this storage reference's bucket.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → Storage
-
The Storage service associated with this reference.
no setter
Methods
-
child(
String path) → StorageReference -
Returns a child StorageReference to a relative
path
from the actual reference. -
delete(
) → Future - Deletes the object at the actual location.
-
getDownloadURL(
) → Future< Uri> - Returns a long lived download URL for this reference.
-
getMetadata(
) → Future< FullMetadata> -
Returns a
FullMetadata
from this reference at actual location. -
list(
[ListOptions? options]) → Future< ListResult> - List items (files) and prefixes (folders) under this storage reference. List API is only available for Firebase Storage Rules Version 2.
-
listAll(
) → Future< ListResult> - List all items (files) and prefixes (folders) under this storage reference. List API is only available for Firebase Rules Version 2.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
dynamic blob, [UploadMetadata? metadata]) → UploadTask -
Uploads data
blob
to the actual location with optionalmetadata
. Returns the UploadTask which can be used to monitor and manage the upload. -
putString(
String data, [String? format, UploadMetadata? metadata]) → UploadTask -
Uploads String
data
to the actual location with optional Stringformat
andmetadata
. -
toString(
) → String -
Returns the String representation of the current storage reference.
override
-
updateMetadata(
SettableMetadata metadata) → Future< FullMetadata> -
Updates metadata from this reference at actual location with
the new
metadata
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
ReferenceJsImpl jsObject) → StorageReference -
Creates a new StorageReference from a
jsObject
.