I'd like to show a list of available upload destinations on a form in a custom module, are there functions to help with this?
-
Could you be a little more clear? There are add-ons like Assets that make this very trivial if you are concerned with content editors organizing their files. devot-ee.com/add-ons/assets. If you meant something else, please edit your question for clarity.– jrothaferCommented May 29, 2015 at 17:13
-
sorry, it's for a custom module– user6359Commented May 29, 2015 at 17:17
Add a comment
|
1 Answer
Yup, just load and then use the File Upload Preferences model:
$group_id = ee()->session->userdata('group_id');
ee()->load->model('file_upload_preferences');
$upload_destinations = ee()->file_upload_preferences_model->get_file_upload_preferences($group_id);
-
Thank you, one correction: it's ee()->load->model('file_upload_preferences_model')– user6359Commented May 30, 2015 at 8:35