• I am writing my plugin which takes a form input file type
    and i am able to store the file using
    wp_handle_upload in the default uploads folder.

    i want the uploaded files not by the uploads or uploads/year/month but in my own custom created directory.(which maybe a subdirectory or a subdirectory of a subdirectory of uploads DIR ).For eg,lets say i have pictures of football,they should be uploaded to uploads/football or
    if it is the pictures of wildlife,it should be uploaded to uploads/nature/wildlife.

    I progressed only as far as craeting a new subdirectory or its children using wp_mkdir_p

  • The topic ‘upload files to a custom directory’ is closed to new replies.