Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismael 71 posts 354 karma points
    Apr 13, 2018 @ 03:45
    Ismael
    0

    Custom workflow with media folder picker.

    Hi,

    I'm trying to make a custom workflow that will store an uploaded image into a chosen media folder - In my workflowtype I have a property with a view = 'File' - this brings up the media overlay however when I select a folder and hit submit, nothing happens, it seems it only works if I choose a file.

    Ideally I'm looking for something like "Save as Umbraco Content" but for media instead.

    Anyone tried something like this?

    (using umbraco 7.92, forms.core 6.0.7)

    Cheers, Ismael.

  • Ismael 71 posts 354 karma points
    Apr 16, 2018 @ 23:17
    Ismael
    0

    What i did in the end was to make my own editor based on the "file.html" that comes with UmbracoForms, also making a copy of the "UmbracoForms.SettingTypes.File" controller and modifying the "populateFile" function like so:

    if (item.contentTypeAlias === "Folder") {
        $scope.setting.value = item.id;
    } else {
        var umbracoFileProp = _.findWhere(item.properties, { alias: "umbracoFile" });
         $scope.setting.value = umbracoFileProp.value;
    }  
    

    This suits my current needs, but I don't think its the best solution having to hardcode the alias type.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies