I am checking if the file is of mp4 format once a user submits the form, this does not work for me:
if(!($_FILES["videoFile"]["type"] == "video/mp4"))
{
// error handling
}
The file type works for other file types such as png/jpg ect but not for mp4.
echo $_FILES["videoFile"]["type"] = [tmp_name]
echo $_FILES["videoFile"]["name"] = movie_300.mp4
when I print out the array of files i get:
Array ( [videoFile] => Array ( [name] => movie_300.mp4 [type] => [tmp_name] => [error] => 1 [size] => 0 ))
Why is my file type [tmp_name] when uploading mp4s?