U4-6527 - umbracoBytes Property of Umbraco.Media Object Returns Incorrect File Size

Created by Ashford Borough Council 17 Apr 2015, 13:21:40 Updated by Shannon Deminick 26 Jun 2017, 07:11:21

During recent development I wanted to display the file size next to the filename as part of a download link for an uploaded media file (PDF). When using the GetPropertyValue function to return the umbracoBytes property I discovered that the value returned did not match the size of the file uploaded to the media folder. For example an uploaded file of size 2,846,720 bytes (2780 KB) had an umbracoBytes property of 2,694,159 bytes (2631KB). In each case the umbracoBytes value is lower than expected, and this discrepancy increases with file size.

The version of Umbraco is 7.2.2


Alain 19 May 2015, 14:26:24

Same issue with image files (jpg, png, ...) in Umbraco 7.2.4

Shannon Deminick 26 Jun 2017, 07:11:22

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: