Copied to clipboard

Flag this post as spam?

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


  • Silvija 58 posts 172 karma points
    Sep 10, 2019 @ 19:06
    Silvija
    0

    How to keep model values after model state validation fails

    I have simple form with upload image and few text input fields. When user select image for upload (which is valid) and populate some text fields and submit that form, if model state is not valid and I use return CurrentUmbracoPage() Image path will gone and user will have select that image again, my text input fields will stay the same.

    So how can I prevent that behaviour and keep that image path if its valid?

  • Paul Seal 524 posts 2889 karma points MVP 7x c-trib
    Sep 10, 2019 @ 19:32
    Paul Seal
    0

    Hi I believe it is a browser security feature to not persist file uploads between posts.

    Cheers

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft