D
D
Denis Bukreev2017-04-22 10:14:06
JavaScript
Denis Bukreev, 2017-04-22 10:14:06

Why does Mac display file sizes incorrectly?

So it goes.
I ran into a problem: when loading a file and calculating its size (using JS), there was a mismatch with the file system data.
Those. on the railway the picture is 479KB in size, and when uploaded to the site and calculated (divided by 1024), it turns out to be 468KB in size.
Dividing the received bytes by 1000 in the code, I got the same result as on the poppy.
Why does the poppy divide by 1000 and not by 1024?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2017-04-22
@denisbookreev

because kb is 1000 b, not 1024 b.
https://ru.wikipedia.org/wiki/Binary_prefixes#....

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question