Issue #572 - Refactored to get upload progress to report total bytes correctly
This commit is contained in:
parent
7dba72a377
commit
cf934908a3
|
@ -338,11 +338,8 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Uri file = getURI(localPath);
|
Uri file = getURI(localPath);
|
||||||
InputStream inputStream = getReactApplicationContext().getContentResolver()
|
|
||||||
.openInputStream(file);
|
|
||||||
|
|
||||||
StorageMetadata md = buildMetadataFromMap(metadata);
|
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
|
// register observers to listen for when the download is done or if it fails
|
||||||
uploadTask
|
uploadTask
|
||||||
|
|
Loading…
Reference in New Issue