[MAGNOLIA-6163] Add method to templating functions to get file extension from filename and a human readable filesize Created: 14/Apr/15  Updated: 15/Apr/15  Resolved: 14/Apr/15

Status: Closed
Project: Magnolia
Component/s: templating components
Affects Version/s: None
Fix Version/s: 5.4

Type: Improvement Priority: Neutral
Reporter: Philip Mundt Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MTE-15 Remove redundant methods getFileExten... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

To simplify templating with files/assets we should provide methods to "extract" the file extension form a filename and to get a filesize in a human readable string.

  • getFileExtension("filename.ext")ext
  • getDisplayFileSize(1970176)1MB

Generated at Mon Feb 12 04:11:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.