Issue #572 - Refactored to get upload progress to report total bytes correctly

This commit is contained in:
Peter Oxenham 2017-11-03 09:44:04 +10:00
parent 7dba72a377
commit cf934908a3
1 changed files with 1 additions and 4 deletions

View File

@ -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