﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19348	Sizes returned by filesizeformat are incorrect.	Nathan Osman	Claude Paroz	"The template filter 'filesizeformat' appears to be returning incorrect results:

{{{
>>> from django.template.defaultfilters import filesizeformat
>>> filesizeformat(123456789)
u'117.7 MB'
}}}

According to [http://physics.nist.gov/cuu/Units/binary.html the International System of Units (SI)], the prefix ""mega-"" indicates a quantity of exactly 1000000. Django appears to be using 1024*1024 (1048576) to represent a megabyte which corresponds with the SI prefix ""mebi-"".

This error can be corrected in one of two ways:

 - Replace the units in the strings returned with their proper equivalents:
   {{{
   KB => KiB
   MB => MiB
   etc.
   }}}
 - Use the correct values for KB, MB, etc.:
   {{{
   1024    => 1000
   1048576 => 1000000
   etc.
   }}}"	Cleanup/optimization	closed	Documentation	1.4	Normal	fixed			Accepted	0	0	0	0	1	0
