Skip to content

Commit

Permalink
[adobe#819] Fix invisible size of Download component
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalecki committed Oct 31, 2019
1 parent 49e2167 commit accee8e
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,16 @@ private void initAssetDownload(String fileReference) {
}
}

size = null;
long rawFileSize;
Object rawFileSizeObject = downloadAsset.getMetadata(DamConstants.DAM_SIZE);

if (rawFileSizeObject != null) {
long rawFileSize = (Long) rawFileSizeObject;
size = FileUtils.byteCountToDisplaySize(rawFileSize);
rawFileSize = (Long) rawFileSizeObject;
} else {
rawFileSize = downloadAsset.getOriginal().getSize();
}

size = FileUtils.byteCountToDisplaySize(rawFileSize);
}
}
}
Expand Down

0 comments on commit accee8e

Please sign in to comment.