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

SchmitzIT

Well-known member
Ohai!

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:

1518216142035.webp

It's also allowed in regular attachments:

1518216168005.webp

Yet, here it is:

1518216187803.webp

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

1518216231480.webp

The file in question is 2MB or so.

Any ideas?

Thanks in advance.
 
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.
 
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!

Thanks
 
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 :)
 
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:
 
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.
 
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
 
This isn't actually an issue, but it is confusing. They prevent you from uploading attachments which are not images to the body of the resource so people don't mis-use it. The resource file itself should be selected above this from the "Uploaded files" option. The text is "Type" and I personally recommend changing the phrase 'type' to say something like "Upload Resource".

And 'Attach files' for the description should get it's own phrase which says "Attach images" or something to that effect.
 
This isn't actually an issue, but it is confusing. They prevent you from uploading attachments which are not images to the body of the resource so people don't mis-use it. The resource file itself should be selected above this from the "Uploaded files" option. The text is "Type" and I personally recommend changing the phrase 'type' to say something like "Upload Resource".

And 'Attach files' for the description should get it's own phrase which says "Attach images" or something to that effect.

bingo I was about to say the same thing! A small change to communicate the difference between attachments and resource uploads would solve this. If I'm dumb enough to get confused then my members are hopeless!
 
Top Bottom