How to show decimals only on file sizes greater or equal to 1 MB?

94 Views Asked by At

With Humanizer, is there any built-in way to display a file size < 1 MB without any decimals and display a file size >= 1 MB with 1 or 2 decimals? Or does one need to write a custom method for that?

0

There are 0 best solutions below