Try to change 'application/x-msdownload' in the code to 'application/octet-stream'
this solved my problem
the new code will be
Code:
// Edit the 3 options in the line below within the single quotes '' to prevent file uploads
if($fileUpload->type == 'application/octet-stream' && $fileUpload->size >= '61440' && $fileUpload->size <= '454660')
{
$fileUpload->error = t('classuploader_kill_upload_error', 'The file you are uploading is not allowed to be uploaded to this site.');
}
I'm thinking about why you are going to block all .exe files, maybe you are trying to block those .exe (193 KB) spam files:
if I'm right I think it's better to find a solution to block files based on their MD5 hashes not based on their extensions, because all those .exe spam files have the same MD5 hash "a6c95227edd022185a6021ea77a07fe6"
INSERT INTO site_config VALUES
(null, 'blocked_file_hashes', '', 'The file md5 hashes that are not allowed to be uploaded. Separate items with a comma, without spaces.', '', 'string', 'File Uploads');
Code:
$blocked = explode(',', SITE_CONFIG_BLOCKED_FILE_HASHES);
foreach ($blocked as $filehash)
{
if(md5_file($uploadedFile) == $filehash)
{
$fileUpload->error = t('classuploader_kill_upload_error', 'The file you are uploading is not allowed to be uploaded to this site.');
}
}