简体   繁体   中英

Uploading a local database to Firebase Storage

I want to upload my local SQLite Database to Firebase. I have created SQLite database which is stored in data/databases. Is there any way I can upload and download this database with the help of Firebase? Any help will be appreciated. And I want to use Firebase Storage not Realtime Database.

If you have a local file, you can upload it to Firebase Storage using its API. An example of that can be found in the Firebase documentation on uploading a local file :

Uri file = Uri.fromFile(new File("path/to/images/rivers.jpg"));
StorageReference riversRef = storageRef.child("images/"+file.getLastPathSegment());
uploadTask = riversRef.putFile(file);

Check the link for full documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM