new Storage()
Class that provides cloud-based storage capabilities.
Class that provides cloud-based storage capabilities. Callers should use
MobileBackend's Storage() property.
- Source:
Methods
-
getCollection(name, userId, userIsolated, lazyLoad, successCallback, errorCallback)
Returns a StorageCollection with the given name from the service associated with the user.
-
Returns a StorageCollection with the given name from the service associated with the user. Subsequent accesses to StorageObjects in the StorageCollection will only return StorageObjects owned by the user.
Parameters:
Name Type Argument Description name
String The name of the StorageCollection. userId
String Optional, the ID of the user retrieved from the UI. userIsolated
Boolean <optional>
indicate if collection is in isolated mode, used in combination with lazyLoad and userId. This parameter is not required in case lazyLoad is not provided. lazyLoad
Boolean <optional>
indicate not to load collection metadata successCallback
Storage~getCollectionSuccessCallback <optional>
Callback invoked on success (deprecated use promises instead). errorCallback
Storage~errorCallback <optional>
Callback invoked on error (deprecated use promises instead). - Source:
Returns:
- Type
- Promise.<(StorageCollection|NetworkResponse)>
Examples
name: "JSCollection"
userId: "e8671189-585d-478e-b437-005b7632b8803"
Type Definitions
-
errorCallback(statusCode, message)
Callback invoked on error.
-
Callback invoked on error.
Parameters:
Name Type Description statusCode
Number Any HTTP status code returned from the server, if available. message
String The HTTP payload from the server, if available, or an error message. - Deprecated:
-
- Use promises instead
- Source:
-
getCollectionSuccessCallback(storageCollection)
Callback invoked after successfully fetching a StorageCollection.
-
Callback invoked after successfully fetching a StorageCollection.
Parameters:
Name Type Description storageCollection
StorageCollection The downloaded StorageCollection instance. - Deprecated:
-
- Use promises instead
- Source: