Last chance to get discounted tickets to Codegarden... Price goes up on Tuesday at 20:00 CEST!

Copied to clipboard

Flag this post as spam?

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


  • Ismael 59 posts 308 karma points
    1 week ago
    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 59 posts 308 karma points
    6 days ago
    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.

Please Sign in or register to post replies

Write your reply to:

Draft