We could do with ideally a new one to be honest Gordan. As this file one is not a great workflow in my opinion. You upload an XSLT file to put in th media section and then afterwards you then have to pick it from the media section.
Yes you could, but you will need to create a custom Angular view and associated controller to call any Umbraco associated Angular API calls or if really needed call your own UmbracoAPIAuthorisedController to lookup the current logged in user's media start node.
But for that example I think it's available as a global JS object in the main Umbraco.Sys when logged into the backoffice. Try experimenting in browser devtools console when logged in, to see useful bits in this object.
Umbraco.Sys.ServerVariables.security.startMediaId contains the current logged in user Start Media Node ID
Custom workflow media picker
I am creating a custom workflow for Forms v4.3.2
I want to have a Media Picker but am not sure if that is possible and if so, how to define it.
This is how to create a "Content" picker:
But changing "Pickers.Content" to "Pickers.Media" does not work.
The "Send xslt transformed email" workflow has a media picker for the XSLT file, but I can't see how that is done.
Comment author was deleted
Try view = "File"
Haha!! Yes, that works! Why on earth is it "File" rather than "Media"?
Comment author was deleted
THink since it stores a path to a file rather then a media id
BAM exactly what Tim said Gordan the view for this needs to be
File
The default settings/editors we ship can be found at
App_Plugins\UmbracoForms\Backoffice\Common\SettingTypes
However it is possible to build your own custom Angular settings views and specify a path in the C# Workflow provider.
Such as
~/App_Plugins/MyOwnCustomPath/AngularSettingView.html
It's a File Uploader rather than a media picker.
We could do with ideally a new one to be honest Gordan. As this file one is not a great workflow in my opinion. You upload an XSLT file to put in th media section and then afterwards you then have to pick it from the media section.
"File" is working OK for this particular case ... it's just that it isn't very well named (or easy to find out about).
Could I create my own "File" picker which had a pre-defined (configurable?) start location within the media library?
Yes you could, but you will need to create a custom Angular view and associated controller to call any Umbraco associated Angular API calls or if really needed call your own UmbracoAPIAuthorisedController to lookup the current logged in user's media start node.
But for that example I think it's available as a global JS object in the main
Umbraco.Sys
when logged into the backoffice. Try experimenting in browser devtools console when logged in, to see useful bits in this object.Umbraco.Sys.ServerVariables.security.startMediaId
contains the current logged in user Start Media Node IDComment author was deleted
Could be good to add all the default ones to a Constants class so you could do
UmbracoForms.Contants.FieldSettingTypes.File (instead of having to guess the correct name)
Agree. Can you add it Tim to the issue tracker please :)
Comment author was deleted
Done :)
Comment author was deleted
Here it is http://issues.umbraco.org/issue/CON-1198
Thanks Tim ❤️
is working on a reply...