Page 1 of 1

Auto Rename Image to $ID number of that record

Posted: 2019-07-06 04:21
by tminh
How do i Auto Rename Image to $ID number of that record ?
I try to look at all files but cannot know which part for name.
I don't want to use original name of image file.
I think that use ID of that image will be easy for search it on future
thanks

Re: Auto Rename Image to $ID number of that record

Posted: 2019-07-06 05:48
by tminh
i found : function PrepareUploadedFile

I use this to get the latest record ID but it does not works, please help how do i get latest record id number to assign to image name
$recID = db_insert_id(db_link()); // pmbds.com