The description of the [file:size] token says "The size of the file, in kilobytes.". However, the function uses format_size() which if the file is large enough, will return a size formatted as MBs or higher. The description should just be changed to "The size of the file."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
473 bytes
crashtest_’s picture

Status: Needs review » Reviewed & tested by the community

Works for me in D7 and D8.

Dave Reid’s picture

Component: system.module » token system
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Nice little bugfix. Committed to 7.x and 8.x. Thanks.

Dries’s picture

Committed to 7.x and 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.