mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-23 03:59:18 +08:00
Issue #572 - Refactored to get upload progress to report total bytes correctly
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user