KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
248 stars 91 forks source link

Incorrect file size calculation #100

Closed stephan-james closed 2 weeks ago

stephan-james commented 1 year ago

File size in megabytes should be calculate via 1024 bytes x 1024 kilobytes. Currently it's based on 1000 x 1000 which leads to incorrect behaviour.

rjgotten commented 1 year ago

File size in megabytes should be calculate via 1024 bytes x 1024 kilobytes. Currently it's based on 1000 x 1000 which leads to incorrect behaviour.

The 1024 binary magnitude should use the KiB (kibibyte) and MiB (Mebibyte) SI units. The KB (kilobyte) and MB (Megabyte) SI units should use 1000.

KarimMokhtar commented 2 weeks ago

solved in v. 2.3.11 Thanks for your contribution