MyBB Central

Full Version: Urgent Help Attachment problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi! i am using mybb 1.4 and i'm having problems with the attachments. When registered user is making new post when they try to attach a file they can't do it. They clicked browse and select the file and upload it but the file don't get attached please help me i really need this help.
This has been mentioned a lot on the MyBB forums and is, I think by now, a known bug.

Just make the post and do a full edit and upload then, that gets it to work.
Seems this might have to do with cache. Try to rebuild your attachment cache. There are a few people reporting this problem at mybb and I haven't been told the cause yet.
Edit Line 142 of newthread.php

From

Code:
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && $mybb->settings['maxattachments'] == 0 && $attachcount < $mybb->settings['maxattachments'])

To

Code:
if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && ($mybb->settings['maxattachments'] == 0 || $attachcount < $mybb->settings['maxattachments']))

That should fix it.