Index
Properties
app
The app associated with the Storage
service
instance.
maxOperationRetryTime
The maximum time to retry operations other than uploads or downloads in milliseconds.
maxUploadRetryTime
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.
-
refFromURL
-
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.
-
setMaxOperationRetryTime
-
Parameters
-
time: number
The new maximum operation retry time in milliseconds.
Returns any
-
setMaxUploadRetryTime
-
Parameters
-
time: number
The new maximum upload retry time in milliseconds.
Returns any
-
useEmulator
-
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.