storage

storage(app) returns admin.storage.Storage

Gets the Storage service for the default app or a given app.

admin.storage() can be called with no arguments to access the default app's Storage service or as admin.storage(app) to access the Storage service associated with a specific app.

Parameter

app

Optional

admin.app.App

Optional app whose Storage service to return. If not provided, the default Storage service will be returned.

Value must not be null.

Returns

non-null admin.storage.Storage The default Storage service if no app is provided or the Storage service associated with the provided app.

Examples

// Get the Storage service for the default app
var defaultStorage = admin.storage();
// Get the Storage service for a given app
var otherStorage = admin.storage(otherApp);

Interface