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.
Yes I did. I tested the beta 0.22 version you sent me and I did reply to the email you had sent. The 0.22 modification worked for uploading a JPEG but failed on a PDF.
Thanks - here's the log transcript, As it shows I successfully uploaded a JPEG image file (I didn't try any processing), but when I tried a PDF I got an error and ended up with a 0 k file in the target folder.
Tom
file not uploaded to the wanted location Error: Can't read image source. not an image?
source is an uploaded file
- upload OK
- file name OK
- source variables
file_src_name : alpha select scrubby.pdf
file_src_name_body : alpha select scrubby
file_src_name_ext : pdf
file_src_pathname : /data/temp/phpZu6PM0
file_src_mime : application/pdf
file_src_size : 186287 (max= 134217728)
file_src_error : 0
process file to /data/in/b/beverley/www/select/locations/test/
- file size OK
- file mime OK : application/pdf
- file name safe format
- destination variables
file_dst_path : /data/in/b/beverley/www/select/locations/test/
file_dst_name_body : alpha_select_scrubby
file_dst_name_ext : pdf
- image operation, keep extension
- checking for auto_rename
- destination file details
file_dst_name : alpha_select_scrubby.pdf
file_dst_pathname : /data/in/b/beverley/www/select/locations/test/alpha_select_scrubby.pdf
- alpha_select_scrubby.pdf doesn't exist already
- can't directly access the uploaded file
attempting creating a temp file: file created
temp file is: /data/in/b/beverley/www/select/locations/test/44e6be310d3f9987e914c203a6aced57.pdf
- image resizing or conversion wanted
- deletes temporary file
What is your code (as in class parameters)? It seems that you attempt to do some image manipulation (image resizing or conversion wanted) on the PDF, but it fails since it is not an image.Reply
Yes I did. I tested the beta 0.22 version you sent me and I did reply to the email you had sent. The 0.22 modification worked for uploading a JPEG but failed on a PDF.
Tom
I will investigate the issue next week, and fix that up. Thanks for the feedback.
Thanks - here's the log transcript, As it shows I successfully uploaded a JPEG image file (I didn't try any processing), but when I tried a PDF I got an error and ended up with a 0 k file in the target folder.
Tom
file not uploaded to the wanted location
Error: Can't read image source. not an image?