Closed lottaar closed 3 years ago
elFinder has some built-in plugins, but we currently don't have a straight forward way to access them. I'll take a look at this to think on a good way to tap into it.
@lottaar I've created an example Gist here: https://gist.github.com/matdave/6167ae9d4860139f00837162172c862d
Basically, you can use the plugin event 'FredOnElfinderRoots' to customize elFinder. We've used it to attach unique media sources, but it can also be used to configure/add plugins to your elFinder instance.
Thanks @matdave for looking into this! Would you mind explaining to a non-programmer where to put the code you linked to, please?
I've tried creating a plugin called elFinderPlugins with the code from your link, and checked FredOnElfinderRoots under system events. Then tried uploading an image called Kerstin Andersson, porträtt.JPG but the name isn't changed.
Not sure if this is a bug or a request, but I'm wondering if there is any way to sanitise file names upon upload? For example, if the client uploads an image called Jättegod smörgås.JPG it should be automatically be renamed jattegod-smorgas.jpg. In MODX I normally use Filesluggy for this, but when using Fred for uploads Filesluggy doesn't seem to work.