Incorrect file size next to assets is incorrect

(Jordan Elver) #1

Reports “58211 kb” but those are bytes, not kilobytes. We should either display bytes so as to be correct, or, perhaps more usefully, format to actual kilobytes.

PushType development roadmap
(Aaron Russell) #2

Good spot @jordelver. Do you want to sort that out?

That is being rendered by javascript by the way. PushType::AssetsHelper.asset_hash would be the place to format it in Ruby, although you may decide to leave it as bytes in the json object, and use javascript to format it, If so I wouldn’t object to you chucking something like into the asset pipeline as I’m sure we’ll need to format numbers elsewhere.

Also take a look at admin/app/views/fields/_asset.html.haml as the same info is displayed in the asset field.

(Jordan Elver) #3

Cool, I’ll have a look.

(Aaron Russell) #4

Shes fixed:

(Aaron Russell) #5