You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file validator should return some like this: The uploaded file is larger than 15.0 MiB!
instead of this: The uploaded file is larger than 15728640 Bytes!
we could implement a conversion like this:
def sizeof_fmt(num, suffix="B"):
for unit in ("", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"):
if abs(num) < 1024.0:
return f"{num:3.1f} {unit}{suffix}"
num /= 1024.0
return f"{num:.1f} Yi{suffix}"
hsize = sizeof_fmt(size)
and use this in the message show to the user.
The text was updated successfully, but these errors were encountered:
The file validator should return some like this:
The uploaded file is larger than 15.0 MiB!
instead of this:
The uploaded file is larger than 15728640 Bytes!
we could implement a conversion like this:
and use this in the message show to the user.
The text was updated successfully, but these errors were encountered: