2
0
mirror of synced 2025-01-11 06:35:51 +00:00

Merge commit '8b54d964f8cec4d58f338f6aa2a1d5322a54fadf'

# Conflicts:
#	android/src/main/java/io/invertase/firebase/storage/RNFirebaseStorage.java
This commit is contained in:
Chris Bianca 2017-11-03 08:04:32 +00:00
commit 42987d2c4d

View File

@ -337,17 +337,9 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule {
Log.i(TAG, "putFile: " + localPath + " to " + path);
try {
StorageMetadata md = buildMetadataFromMap(metadata);
UploadTask uploadTask;
Uri file = getURI(localPath);
if (localPath.startsWith("content://")) {
InputStream inputStream = getReactApplicationContext().getContentResolver()
.openInputStream(file);
uploadTask = reference.putStream(inputStream, md);
} else {
uploadTask = reference.putFile(file, md);
}
StorageMetadata md = buildMetadataFromMap(metadata);
UploadTask uploadTask = reference.putFile(file, md);
// register observers to listen for when the download is done or if it fails
uploadTask