upload script in plugin development [duplicate]

Have you looked at wp_upload_bits, it will create th file in the upload folder.

Example :

 $upload = wp_upload_bits( $_FILES["course_file"]["name"], null, file_get_contents( $_FILES["course_file"]["tmp_name"] ) );