try this way:
function wp128084_upload_dir( $pathdata ) {
// change path here
return $pathdata;
}
add_filter('upload_dir', 'wp128084_upload_dir');
add this where you want to change upload directory then again remove filter
to change to default wordpress directory
remove_filter('upload_dir', 'wp128084_upload_dir');