[solved] get latest file name after uploading file |
[eluser]dimazarno[/eluser]
Hi, everyone.. i have a bit question, i'm just try to upload image using file uploading class, and it works perfectly. but now i have no idea how to get the latest file_name after auto renaming files. example: 1. upload ci.jpg 2. upload ci.jpg again then its automatically numbered, so become ci1.jpg my question is how to get the name ci1.jpg so i can put it on database. thanks.
[eluser]BrianDHall[/eluser]
Check out the File Uploading Class Quote:$this->upload->data() Orig_name being the original name, as otherwise (such as in the path) you get the new name.
[eluser]dimazarno[/eluser]
thanks for your reply, is it any query maybe something like these : $this->upload->data('file_name'); sorry i'm still newbie here..
[eluser]BrianDHall[/eluser]
Almost: Code: $data = $this->upload->data(); upload->data() returns an array with all that info in it. You can use var_dump($data) with the above code to get a better feel for all the information the file upload class returns.
|
Welcome Guest, Not a member yet? Register Sign In |