General developer forum

Is there a Mustache template for filemanager/uploading a file?

 
Picture of Dave Balch
Is there a Mustache template for filemanager/uploading a file?
Core developersParticularly helpful MoodlersPlugin developers

Hi,

I'm trying to upload an image (as a draft), identify and return it's size (pixel dimensions) for further use in a form to set up an activity (and later save the image, when saving the activity).

So far I've figured out I can get the form layout columns in javascript via:

templates.render('core_form/element-filemanager', context)

...but this needs me to provide the actual filemanager UI in the data's element.html - and I can't see where to get it from.

Cheers,
Dave.

 
Average of ratings: -
Picture of Dave Balch
Re: Is there a Mustache template for filemanager/uploading a file?
Core developersParticularly helpful MoodlersPlugin developers

Never mind, I realised it would be easier to have a filemanager element on the page, but disabled and hidden until I need it.

 
Average of ratings: -