Copied to clipboard

Flag this post as spam?

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


  • Yannick Sutter 4 posts 74 karma points
    Mar 04, 2020 @ 15:14
    Yannick Sutter
    0

    Pick a file for download

    hi everyone

    I try to implement a custom workflow for UmbracoForms. After a user fills out the form, he should get a E-Mail with a Link to download a specific file.

    I tried to add a property with the view "File" for the workflow settings, but when i want to submit my media selection i got a error, because umbracoFileProp is undefined.


    UmbracoForms Code:

    function populateFile(item) {
    
            //From the picked media item - get the 'umbracoFile' property
            //Previously we was assuming the first property was umbracoFile but if user adds custom propeties then it may not be the first
            //Rather than a for loop, use underscore.js
            var umbracoFileProp = _.findWhere(item.properties, {alias: "umbracoFile"});
    
            if(typeof umbracoFileProp.value === 'object'){
                $scope.setting.value = umbracoFileProp.value.src;
            }else{
                $scope.setting.value = umbracoFileProp.value;
            }
    
    
        }
    

    in the parameter item I see the selected File, but item.properties is already undefined.

    Does anyone know a solution for this? I use Umbraco 7.15.3 and UmbracoForms 7.2

    Thank you

    Yannick

  • Pedro 1 post 21 karma points
    May 18, 2020 @ 13:30
    Pedro
    0

    Hi,

    Did you figure out the cause of the issue? I believe I'm facing a similar problem after upgrading from Umbraco 7.4.3 to 7.15.5, and to Umbraco Forms 7.4.1.

    I've implemented a kind of workaround for the issue, using the property "item.metaData.MediaPath" which, at least in my case, appears to correctly be set, but this is likely a patch for some other issue I couldn't find.

    Thanks,

    Pedro

  • Damien Holley 179 posts 540 karma points
    Feb 25, 2021 @ 02:05
    Damien Holley
    0

    Also getting similar issue on forms 7.4.2 and Umbraco. 7.15.1 and 7.15.2

    Uploaded files not downloadable in backoffice section either.

Please Sign in or register to post replies

Write your reply to:

Draft