• Resolved jan4971

    (@jan4971)


    Hey. Good work till now. But i got issues with the uploader as admin.

    When i remove the right upload_files its working using a simple http uploader.
    Same for subscriber without changing rights.
    The “extended” uploader shows me an http error, but only on the frontpage.
    I wasnt able to fix this by disabling other plugins or chmod the content directory.

    This is something like a bug report and a feature request.

    https://www.ads-software.com/plugins/wp-user-avatar/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure if I understand what you’re trying to do. Do you want to use the simple uploader or the Media Uploader? The Media Uploader shows for Authors, Editors, and Administrators because they all have upload_files capability (as well as some other capabilities that I check for). So, if you take away that capability from those roles, you would see the simple uploader that I use for Contributors and Subscribers.

    If you’re getting an http error with the Media Uploader after trying to upload a file, I can’t say for sure what it would be. What other plugins do you have active?

    Thread Starter jan4971

    (@jan4971)

    What other plugins do you have active?

    I already tried it with all other plugins disabled.

    The Media Uploader shows for Authors, Editors, and Administrators because they all have upload_files capability

    Yup. Removing it gets the simple uploader, but i cant upload files in posts or pages. But it works for uploading avatars.

    If you’re getting an http error with the Media Uploader after trying to upload a file, I can’t say for sure what it would be

    Me neither, in the backend it works for all uesrs btw. In the frontend it does not work.

    So my question is, if there is a way to force the simple http uploader for the shortcode for everyone.

    You can add this code to the functions.php file of your theme:

    function my_media_uploader_filter() {
      return false;
    }
    add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
    Thread Starter jan4971

    (@jan4971)

    function my_media_uploader_filter() {
      return false;
    }
    add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');

    Working for me ??

    EDIT: I added:

    if ( $post->post_name == 'put your postname here' ) {
    			return false;
    	}

    to restrict this to a specific page.

    For me it looks like this in the end:

    function my_media_uploader_filter() {
    
    	if ( $post->post_name == 'put your postname here' ) {
    			return false;
    	}
    }
    add_filter('wpua_is_author_or_above', 'my_media_uploader_filter');
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Feature request] Support for simple http uploader’ is closed to new replies.