Index
Properties
app
The app associated with the Storage
service
instance.
max Operation Retry Time
The maximum time to retry operations other than uploads or downloads in milliseconds.
max Upload Retry Time
The maximum time to retry uploads in milliseconds.
Methods
ref
-
Returns a reference for the given path in the default bucket.
Parameters
-
Optional path: string
A relative path to initialize the reference with, for example
path/to/image.jpg
. If not passed, the returned reference points to the bucket root.
Returns Reference
A reference for the given path.
-
ref FromURL
-
Returns a reference for the given absolute URL.
Parameters
-
url: string
A URL in the form:
1) a gs:// URL, for examplegs://bucket/files/image.png
2) a download URL taken from object metadata.
Returns Reference
A reference for the given URL.
-
set Max Operation Retry Time
-
Parameters
-
time: number
The new maximum operation retry time in milliseconds.
Returns any
-
set Max Upload Retry Time
-
Parameters
-
time: number
The new maximum upload retry time in milliseconds.
Returns any
-
use Emulator
-
Modify this
Storage
instance to communicate with the Cloud Storage emulator.Parameters
-
host: string
The emulator host (ex: localhost)
-
port: number
The emulator port (ex: 5001)
-
Optional options: { mockUserToken?: EmulatorMockTokenOptions | string }
-
Optional mock
User Token?: EmulatorMockTokenOptions | string the mock auth token to use for unit testing Security Rules
-
Returns void
-
The Firebase Storage service interface.
Do not call this constructor directly. Instead, use
firebase.storage()
.See Get Started on Web for a full guide on how to use the Firebase Storage service.