![]() |
image upload max size
In the image upload page, it says the max size is 250kb. Do you really mean 250 kilo-bit, or do you mean kilo-byte? I tried to upload a pic that's 248kB and it didn't go through because it's too big.
|
PHP Code:
'filesize' returns the file size in bytes. |
kilo != 1000
Ok, now I know what my problem is. My 248KB file is less than 250KB but greater than 250,000B ;)
A little clarification for those who are confused. In computers, 1 kilo does not equal 1000 (10^3), it's actually 1024 (2^10). mega (2^20), giga (2^30), tera (2^40) and whatever's after that also differ from the metric prefixes. So after a quick calculation, my 248KB file is actually (248KB * (1024B / 1KB)) = 253,925B. Mike |
Of course, that could be corrected to a "true" 250KB by changing the code so it looks something like this...
PHP Code:
|
| All times are GMT -5. The time now is 23:04. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi