Support » Plugin: SVG Support » Sorry, this file type is not permitted for security reasons

  • Resolved damhnait

    (@damhnait)


    Hello,

    I love your plugin. I have been using it for years never having a problem.
    But today I have an error any time I try to upload an .svg image, ‘Sorry, this file type is not permitted for security reasons’. No other file type has any issues. I just upgraded to WordPress 4.9.9. I have de-activated all plugin’s save yours of course, but still have the same error. Activated the 2017 stock theme for WordPress and still have the issue.

    Any help would be appreciated!

    Regards
    Damhnait

Viewing 15 replies - 1 through 15 (of 17 total)
  • Justin

    (@conwaydev)

    Same!

    keithuff

    (@keithuff)

    Same!

    damhnait

    (@damhnait)

    You can add the following to your wp-config.php file for a temporary fix:

    define(‘ALLOW_UNFILTERED_UPLOADS’, true);

    Though that is a security risk. Luckily for me I am developing a website locally.

    akshat05

    (@akshat05)

    Same!

    aqziany

    (@aqziany)

    Same. Can you help? Tried with plugin, wp-config, etc. Nothing!

    vburesh

    (@vburesh)

    Same. WordPress 5.0.1

    Plugin Author Benbodhi

    (@benbodhi)

    Hi everyone, sorry about this!
    This wasn’t an issue when testing in 5.0-alpha-42993.

    I will be working on it as soon as possible.

    Plugin Author Benbodhi

    (@benbodhi)

    Ok, this post explains the issue with new mime type checks.

    So when uploading an SVG, it has to have the <xml> tag in it for example, the first line might look like this:
    <?xml version="1.0" encoding="utf-8"?>

    You could possibly get away with simply adding this line to the first line of your SVG when opened in a plain text/code editor such as sublime text before uploading to your site.

    Plugin Author Benbodhi

    (@benbodhi)

    I’m not too sure if I can do something in my plugin to avoid this issue, but I’m looking into it.

    Unfortunately I’m the sole dev on this and I’m gong in for surgery this week… but I will do my best to work on this and try to develop a solution to avoid this issue where possible.

    But it looks like, worst case, we have to include the <?xml version="1.0" encoding="utf-8"?> line in our SVG before uploading and we’re good to go 🙂

    shamank

    (@shamank)

    Hi @benbodhi! Good work with your plugin and thank you for all your effort. I’m experiencing this issue in latest WP (5.0.1). I tried adding the header you suggest but still the same. I’ll try temp solution suggested above.

    PS: I’m not seeing thumbs in media uploader as I used to do in Avada. Maybe they changed something. Let me know if you want the latest version of Avada (we bought it in themeforest) in case you’d like to test it.

    Good luck with the surgery man! I wish you the best 🙂

    shamank

    (@shamank)

    Thank you @damhnait, your solution worked!

    @benbodhi Just FYI, after adding ALLOW_UNFILTERED_UPLOADS in wp-config.php, I can see thumbs in Media uploader again.

    @benbodhi thank you, that helped! If you are using SVGOMG, leaving “Remove XML instructions” off allows to upload otherwise optimized SVG files using the plugin.

    Plugin Author Benbodhi

    (@benbodhi)

    Hey everyone,
    Thanks for your input and helping isolate some workarounds for the time being.
    I’m a one man team so it’s truly appreciated when the community is able to help each other, especially when I’m out of action.

    I’ve been thinking a lot about all this and will likely be rewriting the whole plugin when I get a chance to incorporate a number of new features and better integration with the new block editor.

    Thanks for the support.

    tceriksen

    (@tceriksen)

    Dear Benbodhi.

    Thankyou for sharing this plugin and offering your support. I had the same problem as the thread starter, but your suggestion with adding <?xml version=”1.0″ encoding=”utf-8″?> worked.

    Best regards.

    Thomas, Denmark

    HI everyone. I have very strange problem and Im running out of ideas. Im tryong to troubleshoot xml uploads on multisite setup with 4 domains and WP version 4.9.9. Php version 7.2. Uploading xml works fine if file is up to 2 mb. For larger files, i got this error “sorry, this file type is not permitted for security reasons.”
    On the same host there is more WP pages, and I tested uploading there 7 MB xml and it went fine. So its not php issue: upload_max_filesize 48mb
    Also nginx config has max post size 48 mb. Error is very confusing. I tried to troubleshoot it. Unfortunately as an admin I do not see networking and I cannot install plugins, but I did few other things, like define(‘ALLOW_UNFILTERED_UPLOADS’, true) and I allowed file extension in /path/to/Wordpress-root-install/wp-contents/themes/current-theme/functions.php. I cannot find out where in wordpress change this filesize limitation. During upload I can see allowed file size 39 mb. Also when I click new media – I go the same error. Please helep me if anyone has some ideas. Thank you!

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.