$_FILES is empty when working with wordpress custom field image uploading but, its working in core php website
Adding the following hook in the functions.php file solves the problem.
add_action( 'post_edit_form_tag' , 'post_edit_form_tag' );function post_edit_form_tag( ) { echo ' enctype="multipart/form-data"';}