class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : aa.pdf
file_src_name_body : aa
file_src_name_ext : pdf
file_src_pathname : ------/pymr
file_src_mime : application/force-download
file_src_size : 2010 (max= 2097152)
file_src_error : 0
process file to ----------------/resources/31/
- file size OK
Basically, the MIME type of your PDF file is not recognized by the class, or by the underlying system.
application/force-download is a weird MIME type. It should be application/pdf for a PDF document.
It is possible that your server is wrongly set up, and misintepret the MIME types. If you have the mime_magic extension enabled with PHP, check its configuration.
Maybe there is a logic problem in the code... I can't see where at the moment.
Also, do you have open_basedir restrictions in place?
it works
application/force-download is a weird MIME type. It should be application/pdf for a PDF document.
It is possible that your server is wrongly set up, and misintepret the MIME types. If you have the mime_magic extension enabled with PHP, check its configuration.
Maybe this page can help.