The MU forums have moved to WordPress.org

how to lock out uploads all-together? (7 posts)

  1. harrisja
    Member
    Posted 17 years ago #

    I'd like to stop my users from being able to upload items to the weblog server - any way to do this?

  2. JohnWeb
    Member
    Posted 17 years ago #

    Haven't tried this myself, but you could try this plugin and the set the quota to 0 or .1 I suppose.

    http://wpmudevorg.wordpress.com/project/Z-Space-Upload-Quotas

  3. drmike
    Member
    Posted 17 years ago #

    Yes, but it's not going to be fun. Also depends on which levels you want to cut off.

    If you open up your wp-admin/upgrade-schema.php file and page down until you hit the function populate_roles_160, you'll note following line a couple of times:

    $role->add_cap('upload_files');

    That's where the ability to upload is. Figure out at what level you want this access to be granted and remove those lines from where you don't want it. (ie if admins get to upload, then remove it from editor and author)

    Gotta admit though that I'm not clear on how to remove this ability from blogs already created though.

  4. lunabyte
    Member
    Posted 17 years ago #

    Couldn't that part of the add/edit post/page form just be removed? OK, so it's hacking a core file, but that's what would make the most sense to me.

  5. drmike
    Member
    Posted 17 years ago #

    Probably still be able to upload via something like blogdesk though.

  6. lunabyte
    Member
    Posted 17 years ago #

    I wouldn't think so, if the function being posted to doesn't recognize it. I dunno though. I use the performancing extension.

  7. drmike
    Member
    Posted 17 years ago #

    That's why I was thinking that. I don't think the offline editors use the form. I think they pass the uploaded file directly to wordpress.

    Try taking out the form. That's the easiest way to do something like that.

About this Topic