Custom Fields
Support MB Frontend Submission Front end Upload file or image using WP Media

  • Creator
  • #10194


    I am using frontend submission for custom post type submit from frontend. I am using meta box with image_advanced and file_input fields types as custom meta. At time of uploading an images or files from frontend as subscriber , they can currently see the whole media library that's mean other users uploaded data they can see or select from media library.

    After upload it's showing media library with other users uploaded data that's wrong they can see only mine data. There is any solution for that please reply me as soon as possible. I have added below code for allow subscriber to upload file or image from frontend

    function mb_allow_subscriber_uploads() {
        if ( is_admin() ) {
        // Replace 'subscriber' with the required role to update, can also be contributor.
        $subscriber = get_role( 'subscriber' );
        $subscriber->add_cap( 'upload_files' );
    add_action( 'init', 'mb_allow_subscriber_uploads' );


Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #10195

    It should only allow you to upload image or file not to view any past images for the users

    Anh Tran

    Hi Ahmed,

    Please install the Restrict Media Library Access plugin. This plugin restricts access for users so they can only see their own Media Library uploads.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.