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 have file arrays because I have this script being executed with a flash uploader I have which also supports multiple files to be uploaded at once.
The file is uploaded via flash, then applied a session_id name which can be accessed by $_FILE['Filedata']['tmp_name'] that is the file in the /tmp folder on my server.
Your script picks up to make sure that the file is there when calling
$handle = new Upload($_FILES['Filedata']['tmp_name']);
then I take the file and give it a new name using the file_new_name_body to the actual name of the file this in my case
so now the file looks like aoz.jpg instead of phpHuYkOd.jpg
then I call process and upload the file to the server with the new file name. But at this stage the file is now uploaded to look like this aozjpg.jpg
This is where I am stuck, I followed the documentation but it isn't working for me. I'm sorry for not being a creative in PHP to be able to solve this on my own.
I also changed all my file_dst to file_src in my first process but that didn't help.Reply
The file is uploaded via flash, then applied a session_id name which can be accessed by $_FILE['Filedata']['tmp_name'] that is the file in the /tmp folder on my server.
Your script picks up to make sure that the file is there when calling
then I take the file and give it a new name using the file_new_name_body to the actual name of the file this in my case
so now the file looks like aoz.jpg instead of phpHuYkOd.jpg
then I call process and upload the file to the server with the new file name. But at this stage the file is now uploaded to look like this
aozjpg.jpg
This is where I am stuck, I followed the documentation but it isn't working for me. I'm sorry for not being a creative in PHP to be able to solve this on my own.
I also changed all my file_dst to file_src in my first process but that didn't help.