Plugin : Storage
Author:Rex.Rainbow
- File storage in firebase serivice (v3.x only).
Download
Properties
Sub domain
- Sub domain for this function.
Actions
Delete
Action:Detete
- Delete file at url of a firebase storage reference.
- DataRef ( string ) : The Firebase storage ref URL
Domain
Action:Set sub domain
- Set Sub domain ref.
- Sub domain ( string ) : The Firebase data ref URL
Download
Action:Get download url
- Get download url of a firebase storage reference.
- DataRef ( string ) : The Firebase storage ref URL
Metadata
Action:Get metadata
- Get metadata of a firebase storage reference.
- DataRef ( string ) : The Firebase storage ref URL
Action:Update metadata
- Update metadata of a firebase storage reference.
- DataRef ( string ) : The Firebase storage ref URL
Action:Set value
- Set key of metadata.
- Key ( string ) : Key string.
- Value ( number or string ) : Value.
Action:Load JSON
- Load metadata by JSON.
- JSON string ( string ) : JSON string.
Action:Remove key
- Remove key of metadata.
- Key ( string ) : Key string.
Upload
Action:Upload from file chooser
- Upload file from file chooser to firebase storage.
- File chooser ( object ) : File chooser object.
- DataRef ( string ) : The Firebase storage ref URL
Action:Upload from sprite
- Upload image from sprite or canvas to firebase storage.
- Sprite ( object ) : Sprite or canvas object.
- DataRef ( string ) : The Firebase storage ref URL
Action:Upload data URL
- Upload from data URI to firebase storage.
- Data URI ( string ) : Data URI of file
- DataRef ( string ) : The Firebase storage ref URL
Action:Upload string
- Upload string to firebase storage.
- Content ( string ) : String content
- DataRef ( string ) : The Firebase storage ref URL
Action:Upload objectURL
- Upload from objectURL to firebase storage.
- ObjectURL ( string ) : ObjectURL.
- Content type ( string ) : Content type.
- DataRef ( string ) : The Firebase storage ref URL
Upload task
Action:Cancel
- Cancel current uploading.
Action:Pause
Action:Resume
- Resume current uploading.
Expressions
Error
Expression:LastErrorCode
Expression:LastErrorMessage
- Error message (error.serverResponse) .
Metadata
Expression:LastMetadata
- Get metadata of last upload file, or result of the last request. Add 1st parameter to get value at the specific key. Add 2nd parameter for default value if this key is not existed.
Upload
Expression:LastDownloadURL
- Get download URL of last upload file, or result of the last request.
Expression:Progress
- Get the progress, from 0 to 1, of the request in 'On upload progress'.
Expression:TransferredBytes
- Get transferred bytes, of the request in 'On upload progress'.
Expression:TotalBytes
- Get total bytes, of the request in 'On upload progress'.
Conditions
Delete
Condition:On deleted
- Triggered when delete completed.
Condition:On deleted error
- Triggered when delete error.
Download
Condition:On get download URL
- Triggered when get download URL success.
Condition:On get download URL error
- Triggered when get download URL error.
Condition:File doesn't exist
- Return true if file doesn't exist.
Metadata
Condition:On get metadata
- Triggered when get metadata success.
Condition:On get metadata error
- Triggered when get metadata error.
Condition:On update metadata
- Triggered when update metadata success.
Condition:On update metadata error
- Triggered when update metadata error.
Upload
Condition:On complete
- Triggered when uploading completed.
Condition:On error
- Triggered when uploading error.
Condition:On canceled
- Triggered when uploading canceled.
Condition:On paused
- Triggered when uploading paused.
Condition:On resmue
Condition:Is uploading
- Return true if uploading.
Condition:On progress
- Triggered when uploading progress.
Condition:On start
- Triggered when uploading starting.