diff --git a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/DownloadV1V2Impl.java b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/DownloadV1V2Impl.java index 8a87681..0db561b 100644 --- a/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/DownloadV1V2Impl.java +++ b/bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/v1/DownloadV1V2Impl.java @@ -130,7 +130,9 @@ private void initPropertiesFromMedia() { if (rendition != null) { filename = rendition.getFileName(); format = rendition.getMimeType(); - size = FileUtils.byteCountToDisplaySize(rendition.getFileSize()); + if (rendition.getFileSize() > 0) { + size = FileUtils.byteCountToDisplaySize(rendition.getFileSize()); + } extension = rendition.getFileExtension(); } diff --git a/changes.xml b/changes.xml index 5c1f052..e16e714 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,12 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
+