Skip to content

Commit

Permalink
LPS-101667 Use the size from the file version instead of the file ent…
Browse files Browse the repository at this point in the history
…ry so that the appropriate size is displayed
  • Loading branch information
jonathanmccann authored and adolfopa committed Sep 17, 2019
1 parent 6de46ce commit 042e60c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -461,7 +461,7 @@ public void addDownloadMenuItem(List<MenuItem> menuItems)
}

String label = TextFormatter.formatStorageSize(
_fileEntry.getSize(), _themeDisplay.getLocale());
_fileVersion.getSize(), _themeDisplay.getLocale());

label = StringBundler.concat(
_themeDisplay.translate("download"), " (", label, ")");
Expand Down Expand Up @@ -501,7 +501,7 @@ public void addDownloadToolbarItem(List<ToolbarItem> toolbarItems)
}

String label = TextFormatter.formatStorageSize(
_fileEntry.getSize(), _themeDisplay.getLocale());
_fileVersion.getSize(), _themeDisplay.getLocale());

_addURLUIItem(
new URLToolbarItem(), toolbarItems, DLUIItemKeys.DOWNLOAD,
Expand Down
Expand Up @@ -334,7 +334,7 @@ long assetClassPK = DLAssetHelperUtil.getAssetClassPK(fileEntry, fileVersion);
<liferay-ui:message key="size" />
</dt>
<dd class="sidebar-dd">
<%= HtmlUtil.escape(TextFormatter.formatStorageSize(fileEntry.getSize(), locale)) %>
<%= HtmlUtil.escape(TextFormatter.formatStorageSize(fileVersion.getSize(), locale)) %>
</dd>
<dt class="sidebar-dt">
<liferay-ui:message key="modified" />
Expand Down

0 comments on commit 042e60c

Please sign in to comment.