Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does this equal 10mb? [closed]

Tags:

php

$maxFileSize = 1024 * 1024 * 10; // Max 10MB

In what way does 1024 x 1024 x 10 equal 10MB and what would 50 MB equal to?

like image 894
dir45 Avatar asked Oct 18 '25 14:10

dir45


2 Answers

1 megabyte equals 1024 kilobytes, which equals 1024 bytes.

(1024 bytes = 1 KB) x (1024 = 1 MB) x 10 = 10 MB

50 MB would be:

(1024 bytes = 1 KB) x (1024 = 1 MB) x 50 = 50 MB
like image 126
Stuart Wagner Avatar answered Oct 21 '25 03:10

Stuart Wagner


If the 1024 is 1024k then that would equal 10MB. 50MB would be 1024k x 1024k x 50.

like image 31
Sean Avatar answered Oct 21 '25 03:10

Sean