I am trying to display the file size for my media collection in kb. I tried adding a function to transform the bytes that
filesize
returns to kb, but
defaultColumns
only allows for strings and I am not sure where to access the raw filesize data itself to transform.
defaultColumns: ['filename', 'alt', 'width', 'height', 'filesize' ]
Is there any way to display this in the collection list view? I see the file size displayed as kb in the individual media view, but can't find where to access that for
defaultColumns
.
Since you pointed out that it is in other places, this should be considered a bug. The file sizes should be displayed consistently in kb.
I would make an issue, it will be a very quick change to make.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.