Not a bug Unable to upload more than 50 attachments

gib

Well-known member
Affected version
v2.2.10
Before upgrading to v.2.2.10, I was able to upload more than 50 image attachments to a thread no problem.

I have checked both the 'ATTACHMENTS option' (Maximum attachments per message) and the 'MESSAGES option' (Maximum images per message), these are both set to zero (no limit)

I have tried running under nginx and apache, but I am still unable to load more than 50 images (see error below) using XF 2.2.10, there are no warnings or errors in the web logs.

I have also increased PHP settings for max_file_uploads to 1000, but I still can't upload more than 50 files.
I think it used to give a different message if uploading about the file limits in the admin options.
1658592850029.png
I reverted my site to a previous v2.2.9 instance and it uploads more than 50 images no problem, so it looks like something different is happing with v 2.2.10
I also tried the recent 2.2.10 patch and it does the same.

As a test, I resized some small jpg photos and renamed them in a sequence of 60 photos, but it fails on 51st upload in the same image.

I am running on PHP v8.1.8
 

digitalpoint

Well-known member
2.2.10 has a new feature that limits a user's unassociated attachments to 100 by default (basically that means 100 attachments in the last 24 hours on a post or other content that hasn't been submitted).

You can raise the limit with this in your config.php file:

PHP:
$config['unassociatedAttachmentLimit'] = 500;

You can set the number to whatever you want it to be.
 

gib

Well-known member
2.2.10 has a new feature that limits a user's unassociated attachments to 100 by default (basically that means 100 attachments in the last 24 hours on a post or other content that hasn't been submitted).

You can raise the limit with this in your config.php file:

PHP:
$config['unassociatedAttachmentLimit'] = 500;

You can set the number to whatever you want it to be.

Ahh, nice one @digitalpoint , I added that to my config file and I can upload images again, thank you very much !
 

gib

Well-known member
I guess XF must be treating the uploaded images as unassociated during upload until it inserts them into the post
 

digitalpoint

Well-known member
I guess XF must be treating the uploaded images as unassociated until it inserts them into the post
Yep, that's exactly what it's doing. You can't associate an attachment to a post that doesn't exist in the database yet. They get associated when you submit the post (after the post is created).
 
Top