Copied to clipboard

Flag this post as spam?

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


  • George Phillipson 108 posts 287 karma points
    Dec 04, 2017 @ 12:26
    George Phillipson
    0

    Umbraco 7 Upload File - Check if remove file is ticked

    I have an Upload file option in Umbraco 7, the problem I have is if the remove checkbox is ticked and you click publish to remove the file, my code below catches the upload field as empty and display my custom error message.

    if (string.IsNullOrEmpty(urlForFileUpload))
                    {
                        e.CancelOperation(new EventMessage("Error", "Please select an Excel file before publishing",EventMessageType.Error));
                    } 
    

    enter image description here

    Does anyone know what gets passed to the server so that I can check for it and not display my error message if the checkbox is ticked?

Please Sign in or register to post replies

Write your reply to:

Draft