Copied to clipboard

Flag this post as spam?

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

  • Graham Carr 41 posts 261 karma points c-trib
    May 05, 2019 @ 20:05
    Graham Carr

    File Upload Crashes Website


    I added the latest package to a v7.12.4 installation of Umbraco, all worked fine when running the website locally via Visual Studio, but when deployed to our staging server on IIS when accessing the page that contained the form with the Perplex File Upload component on it, it kept crashing the website and taking out the associated AppPool.

    After a bit of analysis and debugging I finally tracked it down to an issue in the FieldType.PerplexFileUpload.cshtml file, as follows:

    @model Umbraco.Forms.Mvc.Models.FieldViewModel
    <input type="file" name="@Model.Name" id="@Model.Id" @(Model.AdditionalSettings.FirstOrDefault(x => x.Key == "MultiUpload").Value == "True" ? "multiple" : "")
        @if (Model.Mandatory)
        { <text> data-val="true" data-val-required="@Model.RequiredErrorMessage" </text> }
        @Html.Raw(Model.AdditionalSettings.FirstOrDefault(x => x.Key == "AdditionalAttributes").Value)

    The "System.Diagnostics.Debugger.Break(); line is what was causing the website to crash, removing this everything worked like a dream, not sure why it was left in their.

    I tried to do a Pull Request to rectify this, but it looks like this particular file has been removed from the solution??



  • Daniël Knippers 137 posts 992 karma points MVP 2x c-trib
    May 06, 2019 @ 07:01
    Daniƫl Knippers

    Hi Graham,

    Thanks for the report, that Debugger.Break() statement should indeed have been removed... Sorry about that. I am curious why it would crash on your staging server though, does it not have the System.Diagnostics assembly somehow? The file is still present in our solution and on GitHub so a pull request should be no problem.

Please Sign in or register to post replies

Write your reply to: