I have a small PHP script that fixes some errors in Subtitle Workshop .srt-files. It works fine, but i have a problem validating .srt-files MIME types. Here's a part of the code in question:
if ( $_FILES['file']['type'] != 'text/plain' &&
$_FILES['file']['type'] != 'application/x-subrip') {
$error .= '<p>MIME type is not allowed!</p>';
}
.srt-files are actually plain text files. When i upload subtitles in .txt-file my script works fine. But when i try to upload the same file with .srt extension i get "MIME type is not allowed!" error. 'application/x-subrip' (found it here) is obviously a culprit. But what should i use instead? Thanks in advance!