Package | com.distriqt.extension.firebase.storage |
Interface | public interface StorageReference extends flash.events.IEventDispatcher |
Method | Defined By | ||
---|---|---|---|
child(path:String):StorageReference
Returns a new instance of StorageReference pointing to a child location of the current reference. | StorageReference | ||
deleteReference():void
Deletes the object at this StorageReference. | StorageReference | ||
getBucket():String
Return the Google Cloud Storage bucket that holds this object. | StorageReference | ||
getBytes(maxDownloadSizeBytes:int):DownloadTask
Asynchronously downloads the object from this StorageReference. | StorageReference | ||
getDownloadUrl():Boolean
Asynchronously retrieves a long lived download URL with a revokable token. | StorageReference | ||
getFile(destinationFile:File):DownloadTask
Asynchronously downloads the object at this StorageReference to a specified system filepath. | StorageReference | ||
getMetadata():void
Retrieves metadata associated with an object at this StorageReference. | StorageReference | ||
getName():String
Returns the short name of this object. | StorageReference | ||
Returns a new instance of StorageReference pointing to the
parent location or null if this instance references the root
location. | StorageReference | ||
getPath():String
Returns the full path to this object, not including the Google Cloud Storage bucket. | StorageReference | ||
Returns a new instance of StorageReference pointing to the root location. | StorageReference | ||
list(maxResults:int, pageToken:String = null):void
List the child items and prefixes in this reference. | StorageReference | ||
listAll():void
List all the child items and prefixes in this reference by recursively
performing list operations. | StorageReference | ||
Asynchronously uploads byte data to this StorageReference. | StorageReference | ||
Asynchronously uploads from a content URI to this StorageReference. | StorageReference |
Event | Summary | Defined By | ||
---|---|---|---|---|
StorageReference | ||||
StorageReference | ||||
StorageReference | ||||
StorageReference | ||||
StorageReference | ||||
StorageReference |
child | () | method |
public function child(path:String):StorageReference
Returns a new instance of StorageReference
pointing to a child location of the current reference.
All leading and trailing slashes will be removed, and consecutive slashes will be compressed to single slashes.
For example:
child = /foo/bar path = foo/bar child = foo/bar/ path = foo/bar child = foo///bar path = foo/bar
Parameters
path:String — The relative path from this reference.
|
StorageReference — The child StorageReference
|
deleteReference | () | method |
public function deleteReference():void
Deletes the object at this StorageReference
.
getBucket | () | method |
public function getBucket():String
Return the Google Cloud Storage bucket that holds this object.
ReturnsString — the bucket
|
getBytes | () | method |
public function getBytes(maxDownloadSizeBytes:int):DownloadTask
Asynchronously downloads the object from this StorageReference
.
A byte array will be allocated large enough to hold the entire file in memory.
Therefore, using this method will impact memory usage of your process.
Parameters
maxDownloadSizeBytes:int — The maximum allowed size in bytes that will be allocated.
Set this parameter to prevent out of memory conditions from occurring.
If the download exceeds this limit, the task will fail
|
DownloadTask — A DownloadTask to monitor the download process
|
getDownloadUrl | () | method |
public function getDownloadUrl():Boolean
Asynchronously retrieves a long lived download URL with a revokable token.
This can be used to share the file with others, but can be revoked by a
developer in the Firebase Console if desired.
This asynchronous process will result in either a StorageReferenceEvent.GET_DOWNLOAD_URL_SUCCESS
on success
or StorageReferenceEvent.GET_DOWNLOAD_URL_ERROR
on failure.
Boolean — true if the retrieval of the download url started successfully
and false if there was an error
|
See also
getFile | () | method |
public function getFile(destinationFile:File):DownloadTask
Asynchronously downloads the object at this StorageReference to a specified system filepath.
Parameters
destinationFile:File — A File representing the path the object should be downloaded to.
|
DownloadTask — A DownloadTask that can be used to monitor or manage the download.
|
getMetadata | () | method |
public function getMetadata():void
Retrieves metadata associated with an object at this StorageReference
.
getName | () | method |
public function getName():String
Returns the short name of this object.
ReturnsString — The name of this object
|
getParent | () | method |
public function getParent():StorageReference
Returns a new instance of StorageReference
pointing to the
parent location or null
if this instance references the root
location.
StorageReference — The parent StorageReference .
|
getPath | () | method |
public function getPath():String
Returns the full path to this object, not including the Google Cloud Storage bucket.
ReturnsString — The path
|
getRoot | () | method |
public function getRoot():StorageReference
Returns a new instance of StorageReference
pointing to the root location.
StorageReference — The root StorageReference .
|
list | () | method |
public function list(maxResults:int, pageToken:String = null):void
List the child items and prefixes in this reference.
Parameters
maxResults:int — The maximum number of results to return
| |
pageToken:String (default = null ) — If continuing from a previous list call, provide the
page token from the event to retrieve the next page of results.
|
listAll | () | method |
public function listAll():void
List all the child items and prefixes in this reference by recursively performing list operations. This may end in an error if there are a lot of objects.
putBytes | () | method |
public function putBytes(data:ByteArray, metadata:StorageMetadata = null):UploadTask
Asynchronously uploads byte data to this StorageReference
.
Parameters
data:ByteArray — The byte array to upload
| |
metadata:StorageMetadata (default = null ) — [optional] StorageMetadata containing additional information (MIME type, etc.) about the object being uploaded.
|
UploadTask — An instance of UploadTask which can be used to monitor or manage the upload.
|
putFile | () | method |
public function putFile(file:File, metadata:StorageMetadata = null):UploadTask
Asynchronously uploads from a content URI to this StorageReference
.
Parameters
file:File — The source File of the upload.
| |
metadata:StorageMetadata (default = null ) — [optional] StorageMetadata containing additional information (MIME type, etc.) about the object being uploaded.
|
UploadTask — An instance of UploadTask which can be used to monitor or manage the upload.
|
storagereference:delete:error | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.DELETE_ERROR
storagereference:delete:success | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.DELETE_SUCCESS
storagereference:getDownloadUrl:error | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.GET_DOWNLOAD_URL_ERROR
storagereference:getDownloadUrl:success | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.GET_DOWNLOAD_URL_SUCCESS
storagereference:getMetadata:error | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.GET_METADATA_ERROR
storagereference:getMetadata:success | Event |
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent
com.distriqt.extension.firebase.storage.events.StorageReferenceEvent.GET_METADATA_SUCCESS