I guess the problem is using:
$_FILES["my_file"]["name"]
as it only contains the name of the uploaded file. If you want to check the file before moving it using move_uploaded_file
you can refer to the temp file using:
$_FILES["my_file"]["tmp_name"]