Byte to megabyte converter (BUG? how to calculate) – Need help


I’ve been struggling for a few hours (over 24 hours) with something that should be relatively simple.

User uploads a file, saving the size of that file in a record. The bubble was saved in BYTE.

When I start the calculation, bubble considers it a floating number and not an integer.

Example on a common calculator:
Byte: 2934209 / 1024^2 = 2.7982797623 MB

How bubble calculates:
Byte: 2,934,209 / 1024^2 = 0.00000821073766296482086181640625 MB

I DON’T UNDERSTAND!

How do I turn this into megabytes?

My application offers storage space to users and I need to show them how much they have used of the total they have.

TRANSLATED WITH GOOGLE TRANSLATOR



Source link

Leave a Comment