davideairaghi / php

repository of php code
Apache License 2.0
12 stars 9 forks source link

Cannot upload files using wp-extra-file-types #8

Open ralphneuff opened 5 years ago

ralphneuff commented 5 years ago

Hi Davide, Apologies for logging an issue here in github, but I don't seem able to log a support request via WordPress.

I've installed your plugin to my WordPress site (hosted by WP) but I'm still unable to upload the file types that I want.

I want to add a .exe to my site for my users to download. I've installed your plugin, checked the "Skip WordPress checks" and selected the .exe file type. I've also added a few custom file types of type .exe with different MIME types. But when I try and upload the file into a page, I still get a WP error:"Sorry, this file type is not permitted for security reasons".

I also tried a .docx too, but that has the same error message.

I'd really appreciate your assistance to be able to upload the file. Thanks!

davideairaghi commented 5 years ago

In Settings – Extra File Types: – have you checked “Check only file extensions” ? – have you checked “Skip WordPress checks” ?

ralphneuff commented 5 years ago

Hi Davide, Yes, in the plug-in settings I've checked both of these. Thanks!

ralphneuff commented 5 years ago

Hi Davide, For future reference, I resolved this. I was browsing to the page, adding a file block, and trying to upload the file directly. This was always generating the error. If instead you upload the file to the media library, and then add the link to the page (still using the file block) it works fine.