Forums

[resolved] Remove MIME types from upload (4 posts)

  1. zkorwin
    Member
    Posted 2 years ago #

    Hi all,

    I'm trying to remove all mime types from uploading except for image files (jpg, gif, png). I've tried editing the includes/functions.php file but it seemed to have no effect as I can still upload any file type. I've also tried the JW mime type plugin (I think it's called) but it only allows you to add mime types to the array.

    Is there some way to get this to happen?

    Thanks.

  2. zkorwin
    Member
    Posted 2 years ago #

    Anyone please?

  3. zkorwin
    Member
    Posted 2 years ago #

    OK, editing wp-includes/functions.php at around line 1063 has an effect but only if you're not logged in as an administrator.

  4. Mark / t31os
    Moderator
    Posted 2 years ago #

    Are you still looking for some help with this (i did notice it was marked resolved), but there's a filter hook for upload mimes that can be used to change the allowed mime types if you still have a need.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags