WordPress.org

Ready to get started?Download WordPress

Forums

How to restrict MIME-Types users can upload? (6 posts)

  1. kidata
    Member
    Posted 6 years ago #

    I didn't find any option to restrict the file/mime types a user can upload to the media library. The users should only upload JPG + GIF and no other formats.
    Anybody knows how to get this working?

  2. wordsmith2009
    Member
    Posted 5 years ago #

    I am having the same problem. I have IIS 6 and wordpress 2.7

  3. popart
    Member
    Posted 5 years ago #

    I'm also looking for a way to restrict media upload types. I only want user to be about to upload JPG + GIF and nothing else. (So, I'd also like to remove the other media upload buttons as well so users won't see Add Video, etc.)

  4. popart
    Member
    Posted 5 years ago #

    I've found a plugin that allows you to add MIME-types, but I don't yet understand how to use this plugin to delete MIME-types. I'd like to be able to manage the default WP2.7 MIME-types. (Ultimately, I'd like to manage MIME-types according to user roles.)

    I also found in wp-includes/functions.php the list of allowed MIME-types, so I suppose it's possible to just edit these here. But it doesn't really provide a solution. Users still see the Add Video button. And editing the core files really isn't great.

  5. popart
    Member
    Posted 5 years ago #

    Forgot to add the link to the plugin if anyone is interested, pjw-mime-config:
    http://blog.ftwr.co.uk/archives/2006/09/03/pjw-mime-config-v090-released/

  6. popart
    Member
    Posted 5 years ago #

    Ok, here's a real hack of a fix... In wp-admin/images/ you will find the media button images: media-button-video.gif is one of them. If you open that image in Photoshop and just delete the image and then save it as a transparent gif, then the button becomes invisible.

    It's not really a fix. You can still click on the invisible button to upload. But at least the button becomes invisible. Ha! Like I said, it's not really a fix.

    What I'd really like to find is the correct CSS file and just set that div to display:none, but I can't find it. I've searched everywhere. Anyone know which CSS file it is?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags