image-lib new filename |
[eluser]jzmwebdevelopement[/eluser]
Hello, I have my image resizer and uploder working fine but I need to pass the thumbnail filename "originalfile_thumb.png" into the database, what stores this? Jess
[eluser]R_Nelson[/eluser]
If im reading what your asking for correctly your looking for something like this Code: function do_upload() {
[eluser]jzmwebdevelopement[/eluser]
I have the following controller but I need to pass the new thumbnail name into my database. I have tried: Code: 'thumbpath' =>$this->upload->file_name.'_thumb' This saves the name as orginalfilename.png_thumb I have also tried: Quote: 'thumbpath' =>$this->upload->file_name' This saves the original file name. What I am trying to do is save the new thumbnail file name witch is orginalfilename_thumb.png Code: if($this->form_validation->run() === TRUE) {
[eluser]R_Nelson[/eluser]
you need to use raw_name not file_name raw_name The file name without the extension
[eluser]jzmwebdevelopement[/eluser]
Thanks, Are you able to give me an example of how to do this as I do not see this in the user_guide. How would I add the file ext to the raw_name?
[eluser]R_Nelson[/eluser]
Code: 'thumbpath' =>$this->upload->raw_name.'_thumb'.file_ext that should work not sure if you need the file_ext at the end. i found this in the file upload class near the bottom of the page! http://ellislab.com/codeigniter/user-gui...ading.html
[eluser]jzmwebdevelopement[/eluser]
Thank you - I was looking in the image manipulation class. I have tried the above but its giving me _thumbfile_ext
[eluser]R_Nelson[/eluser]
i would suggest reading the URL i have you it should work not sure if you need to add a path to the file or what but i know it can be done in CI if not you can use normal php and find the dot and insert the _thumb before it! you would have to lo0k it up but i believe its the substr command or something i forget! |
Welcome Guest, Not a member yet? Register Sign In |