verot / class.upload.php

This PHP class uploads files and manipulates images very easily. It is in fact as much as an image processing class than it is an upload class. Compatible with PHP 4, 5, 7 and 8. Supports processing of local files, uploaded files, files sent through XMLHttpRequest.
http://www.verot.net/php_class_upload.htm
GNU General Public License v2.0
846 stars 359 forks source link

It seems the latest version still not work with gif file #156

Closed alexwenbj closed 2 years ago

alexwenbj commented 2 years ago

I found it said that this issue has been fixed in #50 ,but it seems the latest version still no work with gif.(Only upload, no any other manipulation such as crop/resize etc).Any other configure for gif file? Thank you.

if ($handle->uploaded) {
    $handle->file_new_name_body   = "content-" . date('YmdHisu');
    $handle->process($img_dir);
    if ($handle->processed) {
        $img = array("success" => 1, "message" => "upload success", "url" => $imgs_dir . '/' . $handle->file_dst_name);
        echo json_encode($img);
        $handle->clean();
    } else {
        // ...
    }
}
verot commented 2 years ago

You can display the log produced by the class, and it should provide you with more information about what is happening.

alexwenbj commented 2 years ago

OK, thank you.I will have a try.