rename image with the name I want

See all posts Reply

rename image with the name I want new!
by Carlos Represas, 12 years, 1 month ago
Good day friends,

Is there a way to specify the name of an uploaded file, instead of keeping its original one, for example:

i have a file named MYIMAGE.JPG, and I need it to upload it and save it on my folder as : X020150.JPG, or M_2012_01_08.jpg....

I cant find an option in your documentation that allows me to do that, the NEW file name could be passed throug the URL as a variable.

Please, help. Thank you in advanceReply
Re: rename image with the name I want new!
by colin, 12 years, 1 month ago
You can set the name as following:
$handle->file_new_name_body = 'foo';
$handle->file_auto_rename = false;
$handle->file_overwrite = true;
Reply