Change WordPress Upload Folder using wp handle upload

Don’t store user uploads in your theme folder! I would suggest you store them in a sub-directory of the default uploads folder.

You can use the upload_dir filter to temporarily change the path:

function wpse_183245_upload_dir( $dirs ) {
    $dirs['subdir'] = '/abc';
    $dirs['path'] = $dirs['basedir'] . '/abc';
    $dirs['url'] = $dirs['baseurl'] . '/abc';

    return $dirs;
}

And then in use:

add_filter( 'upload_dir', 'wpse_183245_upload_dir' );

// Your upload code

remove_filter( 'upload_dir', 'wpse_183245_upload_dir' );