@lanwen this code has the same logic (see [here](https://github.com/baev/allure-core/blob/attachments-size/allure-report-face/src/main/webapp/vendor/filesize.js#L66-76)) but it is more configurable.