As designed Error when uploading attachment in RM: "The uploaded file does not have an allowed extension"


Well-known member

So when attempting to attach a pdf file to a resource, I get an "The uploaded file does not have an allowed extension" error. However, pdf is definitely in my allowed resource file extensions list:


It's also allowed in regular attachments:


Yet, here it is:


It's definitely not the upload size. I configured for 200mb in my PHP.ini, and Xenforo happily accepts that:


The file in question is 2MB or so.

Any ideas?

Thanks in advance.


Well-known member
Strangely enough, I have the same issue with zip files. If I add them as the actual Resource file in the initial creation of the resource, it goes fine. When I later on edit the Resource, and then attempt to add a zip file, I get the exact same error about allowed extensions.

Send an old priest and a young priest, please.


XenForo moderator
Staff member
Can you reproduce this repeatedly? I have run into this a couple of times but never on a consistently repeatable basis so havent been able to verify/debug the issue.

Can you send in a ticket with access information if so please!



Well-known member
So far, yes, I have been able to reproduce it repeatedly. I have not yet managed to upload either a PDF or zip file as an attachment. Will open up a ticket now :)


Well-known member
I'm running into the same thing XFRM 2.0.1 with XF 2.0.2 -- it allows me to add a zip file when creating the resource as the resource file but if I edit an existing resource and try to attach a zip file there I get the error message.

Looking at /src/addons/XFRM/Attachment/ResourceUpdate.php it looks like it might hard-coded to only allow images to be attached to a resource in getConstraints? :unsure:


XenForo moderator
Staff member
That's correct as far as the editor is concerned, rather than the resource itself.


Well-known member
I "solved" the issue by editing the php file. Not sure that's the best solution in my case. Possible options:

* Manual edit (which will be overwritten when updating RM)
* Attach the files to the resource itself (add them to the ZIP; not a fan of this one)
* Use a custom field, use CSS to create it into a button, and stuff the PDF or zip behind that (not a bad option if that suits your specific needs)
* Create a small add-on that does the file edit
* Buy a few bottles of Southern Comfort and bribe @Kier into making it an option customizable from the admincp, similar to other attachments.


Active member
This is still an issue on the latest version of XF and Resource Manager, I have to edit the php every time I update. To reproduce: Create a resource, upload a .zip. Now update the resource and try to select another .zip. Fails