Custom file Upload in (spicifiec directory) WordPress

<?php
$dir = wp_upload_dir();

$target_dir = $dir['basedir'] .'/';

$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);

if(move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file))
{
    $url = $dir['baseurl'].basename($_FILES["fileToUpload"]["name"]);

//  update if want to update image 

    update_user_meta( $user_id, 'upload_field', $url);
}
?>

<form  action="" method="post" enctype="multipart/form-data">

<input type="file" name="fileToUpload" id="fileToUpload">

<input type="submit" name="uploade" value="Uplaode Image" />

</form>