hansemannn / titanium-firebase-storage

Use the Firebase Storage SDK in the Titanium SDK 🚀
Other
5 stars 3 forks source link
appcelerator axway firebase firebase-storage titanium

Firebase Storage - Titanium Module

Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.

Supporting this effort

The whole Firebase support in Titanium is developed and maintained by the community (@hansemannn and @m1ga). To keep this project maintained and be able to use the latest Firebase SDK's, please see the "Sponsor" button of this repository, thank you!

Requirements

Download

API's

FirebaseStorage

Methods

referenceForURL(url)
referenceForPath(path)

Properties

storageURL (String, set)
maxUploadRetryTime (Number)
maxDownloadRetryTime (Number)
maxOperationRetryTime (Number)

FirebaseStorage.Reference

Methods

upload(parameters)
download(parameters)
delete(parameters)
getMetadata(callback)

Example

// Require the Firebase Storage module
var FirebaseStorage = require('firebase.storage');

FirebaseStorage.upload({
  data: myBlob,
  callback: function(e) {
    if (!e.success) {
      Ti.API.error('Error: ' + e.error);
    }

    Ti.API.info('Upload completed! Download-URL: ' + e.downloadURL);
  }
});

Build

cd ios
appc ti build -p ios --build-only

Legal

This module is Copyright (c) 2017-Present by Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.