Copied to clipboard

Flag this post as spam?

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


  • Elliot 2 posts 72 karma points
    Dec 14, 2021 @ 17:24
    Elliot
    0

    Validation not working correctly within FormValidateNotification on second POST

    Hi,

    I have a Notification Handler for the FormValidateNotification that does some custom validation for uploaded files on a form.

    My issue is that if validation fails the first time I submit the form but then if I submit the form again without changing anything the validation will pass.

    Looking into this, the issue seems to be that the files uploaded in the first submit are stored in a temp folder and the reference to the files cleared from the HttpContext so technically the files are not uploaded on the second submit but are still attached to the form.

    Is there a way to get a list of the files already stored in the temp folder for this form?

    I also saw that within the upload field on the form has a property called "values" that contains what seems to be encoded data and the file name of the file uploaded. Does anyone know the correct way to decode this data as I assume that contains the folder the file is stored in?

Please Sign in or register to post replies

Write your reply to:

Draft