diff --git a/android/src/main/java/io/invertase/firebase/storage/RNFirebaseStorage.java b/android/src/main/java/io/invertase/firebase/storage/RNFirebaseStorage.java index fce5a2f5..209e832f 100644 --- a/android/src/main/java/io/invertase/firebase/storage/RNFirebaseStorage.java +++ b/android/src/main/java/io/invertase/firebase/storage/RNFirebaseStorage.java @@ -338,11 +338,8 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule { try { Uri file = getURI(localPath); - InputStream inputStream = getReactApplicationContext().getContentResolver() - .openInputStream(file); - StorageMetadata md = buildMetadataFromMap(metadata); - UploadTask uploadTask = reference.putStream(inputStream, md); + UploadTask uploadTask = reference.putFile(file, md); // register observers to listen for when the download is done or if it fails uploadTask