Get original name or rename an upload image

I need help please to upload an image with the original name or rename it.
In the script “functions.php” the image is rename with the “md5 time” function.
Can someone explain me the right way to get the original name file or add an input to rename it???

I attach the zip file from GitHub - Kephson/imguploadncrop: A little image uploader and cropping script with wideimage and imageAreaSelect
thanks!!!


imguploadncrop-master.zip (471 KB)

$_FILES[“file”][“name”] - the name of the uploaded file
$_FILES[“file”][“type”] - the type of the uploaded file
$_FILES[“file”][“size”] - the size in bytes of the uploaded file
$_FILES[“file”][“tmp_name”] - the name of the temporary copy of the file stored on the server
$_FILES[“file”][“error”] - the error code resulting from the file upload

This, of course is assuming you named the input ‘file’
IE:

Hope that helps.
Red :wink:

Thanks redscousse! I will try it…

Sponsor our Newsletter | Privacy Policy | Terms of Service