Support » Plugin: User Meta - User Profile Builder and User management plugin » [PRO] define directory of file upload field

  • Resolved lrrm

    (@lrrm)


    Hi there,
    I’ve bought the pro version and I think it’s very nice.

    There are some questions: It seems like the file upload is working in the backend (files are on server) but no URL/path is stored in the meta field.

    How can we change the directory for the file uploads? Is there a hook or something to do that?

    Thanks,
    lrrm

    • This topic was modified 3 years, 4 months ago by lrrm.
Viewing 1 replies (of 1 total)
  • Plugin Author Khaled

    (@khaledsaikat)

    Hello,

    Thanks for using our plugin. By default, the plugin stores files into wp-content/uploads/files/ directory. If the file name is sample.jpg, the value stored in database as /uploads/files/sample.jpg

    If you wish to change default upload directory use user_meta_upload_dir filter hook.
    e.g.

    
    add_filter('user_meta_upload_dir', function(){
        return '/uploads/my-files/';
    });
    

    This should store files in wp-content/uploads/my-files/ directory.

    Hope it helps.

    Best regards
    Khaled

    • This reply was modified 3 years, 4 months ago by Khaled.
Viewing 1 replies (of 1 total)
  • The topic ‘[PRO] define directory of file upload field’ is closed to new replies.