fancyindex_exact_size
Enables the display of exact file sizes in the NGINX Fancy Index module's directory listings.
Description
The fancyindex_exact_size directive, when enabled (set to 'on'), alters the presentation of file sizes in directory listings generated by the NGINX Fancy Index module. By default, file sizes may be rounded or presented in a simplified format (like kilobytes or megabytes), but with this directive activated, the exact byte size of each file will be displayed. This is particularly useful when precise size measurements are necessary for users, such as when downloading files where size dictates user choices.
This directive can be included in various contexts like http, server, and location, making it flexible in terms of configuration scope. Additionally, it functions as a flag, meaning it only requires the keyword 'on' to enable the exact size formatting. There are no arguments needed for a 'false' setting, as omitting the directive or setting it to 'off' will revert to the default behavior for size display.
Config Example
location /files {
fancyindex on;
fancyindex_exact_size on;
}Ensure that the Fancy Index module is properly installed and enabled; otherwise, this directive has no effect.
When enabling fancyindex_exact_size alongside other formatting options, make sure to test the output to avoid conflicting styles.