Sorry, this file type is not permitted for security reasons.
-
In the recent releases of WordPress, there was changes made to the mime type handling to make sure that files have the extension they say they do (read more in this post).
This poses an issue for SVG files without the
<xml>
tag in them.SVG is actually XML, and WordPress now requires us to have a line such as
<?xml version="1.0" encoding="utf-8"?>
in our SVG file when opened in a code editor. Some graphic software does remove this when saving/exporting our SVG.So, if you receive an upload error “Sorry, this file type is not permitted for security reasons.”, you simply need to open your SVG file in a code editor like sublime text and add the xml tag mentioned above to the first line and save. Then try uploading again.
I will be looking into some way to avoid this issue if I can implement it into my plugin, but for the time being, this is the solution it seems.
Thanks for your support and patience!
- The topic ‘Sorry, this file type is not permitted for security reasons.’ is closed to new replies.