Greetings!
I've got everything setup and working beautifully. However, I get an entire relative path along with the image/file name. Rather than end up with hundreds of database records with that path information, I'd like to have a single variable used site-wide. Then, if we ever move the assets to another directory, we only have to change that one value instead of all records in the database. I can easily put that variable in my site config file.
Obviously, CKFinder needs to know the path to the files when the user is choosing them. I just don't want to include it with the filename once the user has made a choice. For example:
Instead of this:
I'd like to end up with this:
Questions:
1.) Is this doable?
2.) Is the solution simple or horrifically elaborate?
Thanks for your time,
Brandon
Fri, 07/10/2009 - 22:28
#1
Re: SetFileField with no path - image name only
Re: SetFileField with no path - image name only
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: SetFileField with no path - image name only
For those interested, this code goes in the JavaScript within the page that your form is on (as opposed to in any of the more global .js files).
The original function:
Becomes: