BuddyDev

Search

BuddyBlog Pro Media Uploader and Article Images

  • Participant
    Level: Enlightened
    Posts: 98
    Niculae Constantinescu on #45698

    Hi,

    Currently when a user publish an article and upload an image he can see all his images in the WordPress Media Uploader.
    This is not good for my site as I have installed a Listings Directory Plugin and the users can accidentally delete images attached to their Listings.
    My questions are:
    – Are you planning to have for the BuddyBlog Pro a custom Media Uploader similar to BuddyBoss Theme?
    – Is it possible that when a user delete his article the images of that respective article to be also deleted along with the article? In this way I will avoid having any unused images on the server and prevent user from manually delete the images.

    Thank you
    Cristi

  • Keymaster
    (BuddyDev Team)
    Posts: 21467
    Brajesh Singh on #45701

    Hi Cristi,
    Thank you for using BuddyBlog Pro.

    1. We will add the option to disable showing the already uploaded media(by the user), to them. We did it to allow them delete their own media if needed.

    2. At the moment, we don’t have plan to have a custom Media Uploader. We will certainly consider it in future.

    The BuddyBoss media uploader is a hardcoded uploader and can not be used with 3rd party plugins as of now.

    3. The goal of BuddyBlog is limited. We control the front end editing experience. We do not interfere with default WordPress workflow on anything else.
    If you want to have the attachments deleted on post delete, there are many plugins available.

    You may use a plugin such as
    https://wordpress.org/plugins/dx-delete-attached-media/
    https://wordpress.org/plugins/autoremove-attachments/

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 98
    Niculae Constantinescu on #45703

    Hi,
    Thank you for your suggestion regarding the plugins for deleting the media along with deleting the articles.
    I am looking forward to see the option for preventing users to both delete and see their uploaded media.
    Thank you
    Cristi

  • Participant
    Level: Guru
    Posts: 654
    Tosin on #45705

    I saw a solution to 1 at https://www.wpbeginner.com/plugins/how-to-restrict-media-library-access-to-users-own-uploads-in-wordpress/

     // Limit media library access
      
    add_filter( 'ajax_query_attachments_args', 'wpb_show_current_user_attachments' );
     
    function wpb_show_current_user_attachments( $query ) {
        $user_id = get_current_user_id();
        if ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts
    ') ) {
            $query['author'] = $user_id;
        }
        return $query;
    }  
  • Keymaster
    (BuddyDev Team)
    Posts: 21467
    Brajesh Singh on #45706

    Hi Tosin,
    Thank you for the post.

    We already have that functionality.

    The request is to disable this ability of BuddyBlog and avoid listing their own media.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 98
    Niculae Constantinescu on #45965

    Hi,
    Any news?
    Thank you
    Cristi

You must be logged in to reply to this topic.

This topic is: not resolved