how to convert file size in KB/GB

Vidya Vidya wrote:

Hi all,

   I want to find the file size, so i used file_name.size, but while
displaying i want to show in KB or MB like this i want to show to show
the user, i tried number_to_human_size helper also, but this is also not
working well, so please let me know how to do, thanks,

my expected output is:

   TransactionSets.JPG (141 KB)
   Updates.JPG (121 KB)
This will help:

10/31/2007 | 3:51 PM.