Wordpress: “Sorry, this file type is not permitted for security reasons” when trying to upload standard image files

我怕爱的太早我们不能终老 提交于 2019-12-13 10:19:14

问题


Does anyone know of any workaround for this?

I'm trying to upload .jpg and .png files, both file types allowed in standard Wordpress settings, but I get the above error.

The workarounds I've googled so far don't work as Wordpress no longer sees the files i'm uploading as images. These are the plugin: Disable Real Mime Check, and variations of code that allow unfiltered uploads in the functions.php file.

I'm sometimes able to get my images uploaded but mostly not, and I can't see a pattern to which images get uploaded and which don't.

Any advice?


回答1:


You can try editing the wp-config.php file and adding in;

define(‘ALLOW_UNFILTERED_UPLOADS’, true);

This will allow you to then upload forbidden files, however as a precaution once uploaded I would delete this edit.



来源:https://stackoverflow.com/questions/42413005/wordpress-sorry-this-file-type-is-not-permitted-for-security-reasons-when-tr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!