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.
system information - class version : 0.32 - operating system : Darwin - PHP version : 5.4.4 - GD version : 2.0.34 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 32M (33554432 bytes) - language : en_GB source is a local file /path/to/my/image.jpg - error: File not uploaded. Can't carry on a process.
I'm trying to direct stream an image from local path, but I receive an error.
According to documentation I use this code:
$images_name = '/path/to/my/image.jpg';
$handle = new upload($images_name);
header('Content-type: ' . $handle->file_src_mime);
echo $handle->Process();
die();
result of log is:
system information
- class version : 0.32
- operating system : Darwin
- PHP version : 5.4.4
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 32M (33554432 bytes)
- language : en_GB
source is a local file /path/to/my/image.jpg
- error: File not uploaded. Can't carry on a process.
What's wrong?
Thanks in advance
It was only a problem in file path.
Sorry.