Verify if the file is really a PDF file before uploading.