Hi,
the new development tutorial inspired me to develop my first cmsms module. Ty for the effort to write and publish it!
Actually I'm stuck on a basic design issue: I want the admin user to upload images and data in my module backend and just asked my self, if I have to build all the code for the upload, sanitize, conversion and resizing myself, if the fileManager module does it quite well already.
Similar to this old topic: http://forum.cmsmadesimple.org/viewtopic.php?f=6&t=6249
I checked the code of the fileManager module, but couldn't find any obvious hook, so I ask for your best practice or even a tutorial, how to solve uploads in cmsms modules.
Any help is appreciated
J-C
best practice file/image upload in modules
Re: best practice file/image upload in modules
At the moment, FileManager doesn't have a proper API to hook into so, even if possible, it's not yet supported. We are working on implementing it for the next version of CMSMS, so that module developers can use a core file picker, integrated in FileManager, but usable from other modules.simplebx wrote: I checked the code of the fileManager module, but couldn't find any obvious hook, so I ask for your best practice or even a tutorial, how to solve uploads in cmsms modules.
Having said that, and until then, you have currently 2 options:
- for CMSMS 1.1x branch you can use either GBfilePicker or JMFilePicker;
- for CMSMS 2.x branch you only have (afaik) JMFilePicker;
In any case stay tuned for version 2.2 of CMSMS as it will have an API for a File Picker to be used by 3rd party modules.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!