Copied to clipboard

Flag this post as spam?

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


  • zimmertyzim 15 posts 105 karma points
    Jun 25, 2024 @ 15:52
    zimmertyzim
    0

    What's the best approach to virus scan a file upload via Umbraco Forms?

    It's all in the title really.

    One of our clients has asked about this. They've setup some Umbraco Forms and workflows, that accept a file upload. They'd like this so be scanned by an AV service and potentially rejected/accepted.

    What's the best way of going about this?

  • Darren Hunter 146 posts 238 karma points
    Jun 26, 2024 @ 14:28
    Darren Hunter
    0

    I think you need to implement your own code to handle virus scanning and rejection. As much as I am aware there is no direct av integration.

  • zimmertyzim 15 posts 105 karma points
    Jun 27, 2024 @ 10:44
    zimmertyzim
    0

    Thanks -- I figured as much.

    I probably should have been more clear. I was wondering more about the overall workflow/process.

    Can I hijack the Umbraco Forms file upload, process the file (AV scan etc.) then return it back to Umbraco Forms to finish whatever workflow is setup etc.

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    Jun 29, 2024 @ 15:25
    Huw Reddick
    100

    You can create custom workflow for Umbraco forms and add it to your form, some documentation is here - https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Extending/Adding-a-Workflowtype

    you may also be able to do it by hijacking the form post controller

    @using (Html.BeginUmbracoForm<Umbraco.Forms.Web.Controllers.UmbracoFormsController>("HandleForm"))
    
  • Stephen 26 posts 148 karma points
    Aug 14, 2024 @ 01:25
    Stephen
    0

    What did you end up settling on, zimmertyzim? I'm looking into the same problem, and whether a custom workflow or Umbraco's FileStreamSecurityValidator could be used in conjunction with something like the VirusTotal API or a self-hosted solution like ClamAV.

  • zimmertyzim 15 posts 105 karma points
    Aug 14, 2024 @ 07:50
    zimmertyzim
    0

    The client put it on hold in the end, but for what it's worth, ClamAV is what I was leaning towards. I did see FileStreamSecurityValidator, just wasn't sure about tying it into UmbarcoForms.

  • 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