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.
I'm finding that if i'm in the same browser session I can overwrite once. If I try and overwrite a second time then the second image will not get overwritten. I can see options to make directories overwritable but I cannot see anything to try and chmod files you are about to overwrite. I've got $handle->file_auto_rename = false; $handle->file_overwrite = true; already. and iv'e got this on 2 different places and tested it quite a few times to be sure.Reply
Does it have the same behaviour on a second server? It may be a problem of uname.
I tried here to upload one file, and to process it three time, overwriting the first file twice. The only file remaining is the last one, so the overwriting worked both times. See the excerpt of my log:
source is an uploaded file
[...]
- no auto_rename if same filename exists
- destination file details
file_dst_name : abcdef1.jpg
file_dst_pathname : ./test/abcdef1.jpg
- no overwrite checking
[...]
- no auto_rename if same filename exists
- destination file details
file_dst_name : abcdef1.jpg
file_dst_pathname : ./test/abcdef1.jpg
- no overwrite checking
[...]
- no auto_rename if same filename exists
- destination file details
file_dst_name : abcdef1.jpg
file_dst_pathname : ./test/abcdef1.jpg
- no overwrite checking
Is it what you do: upload one image, and overwrite it several times, calling process() several times? Can you paste here your resulting log? Do you have any errors (PHP errors when attempting to overwrite)?Reply
I can see options to make directories overwritable but I cannot see anything to try and chmod files you are about to overwrite. I've got
$handle->file_auto_rename = false;
$handle->file_overwrite = true; already. and iv'e got this on 2 different places and tested it quite a few times to be sure.
I tried here to upload one file, and to process it three time, overwriting the first file twice. The only file remaining is the last one, so the overwriting worked both times. See the excerpt of my log:
Is it what you do: upload one image, and overwrite it several times, calling process() several times? Can you paste here your resulting log? Do you have any errors (PHP errors when attempting to overwrite)?