Reply to Incorrect File type when uploading PDF's

Incorrect File type when uploading PDF's new!
by aalmeida71, 14 years, 5 months ago
upload code:
$handle = new Upload($file, 'pt_BR');
$handle->allowed = array('text/pdf');
if ($handle->uploaded) {
  $handle->Process(stripslashes($DirTo));
}

Log information on the upload!
system information
- class version : 0.28
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : pt_BR
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
UNIX file() command not availabled
- Checking MIME type with mime.magic file (mime_content_type())
mime_content_type() is not available
- Checking MIME type with getimagesize()
getimagesize() failed
- MIME type detected as application/force-download by browser
source variables
- You can use all these before calling process()
file_src_name : LLContabil-2009-02.pdf
file_src_name_body : LLContabil-2009-02
file_src_name_ext : pdf
file_src_pathname : G:\Temp\php38C1.tmp
file_src_mime : application/force-download
file_src_size : 47427 (max= 2097152)
file_src_error : 0
process file to attach/49\
- file size OK
- error: Tipo de arquivo incorreto.
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important