Typoscript to show filesize in FAL

Here is the code to show file size in terms of kilobytes,Megabytes and Gigabytes

lib.image = FILES
lib.image {
references {
table = tt_content
fieldName = media
}
renderObj = COA
renderObj {
10 = TEXT
10.data = file:current:size
10.bytes.labels = Bytes | KB | MB | GB
10.dataWrap = <a target=”_blank” href=”{file:current:publicUrl}” >{file:current:title},&nbsp; |</a>
}
}