Previous Thread
Next Thread
Print Thread
Hop To
Joined: Apr 2011
Posts: 148
S
Member
Member
S Offline
Joined: Apr 2011
Posts: 148
if I want to let peeps upload images up to 5 mb's what number do I put?

What about the same for Maximum size of file attachments?



Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
5*1024*1024 == 5242880 <--

ideally 5M would be nice, but i digress smile

Joined: Apr 2011
Posts: 148
S
Member
Member
S Offline
Joined: Apr 2011
Posts: 148
thanks not going with 5m just needed an example

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yah, no probs

basically it wants the actual number of bytes and a MEG is 1024 * 1024 bytes

so just multiply by 5 to get 5 meg

some peeps fudge and just go with 5000000, but that is technically a wee bit less than 5 meg wink


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 166 guests, and 137 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)