Skip to main content
April 21, 2021
Question

How to validate if the uploaded documents are password protected on UI

  • April 21, 2021
  • 2 replies
  • 0 views

Need to validate any uploaded document which is password protected, display message and not allow those if they are password protected.

Please help.

    2 replies

    mikes0011
    Brainy
    April 21, 2021

    I don't know of any current way to do this.  For ZIP files specifically, there might be a rule in one of the various zip file plug-ins (though I couldn't find anything just now when i checked) that would let you take a zip file and check whether it's password protected.  And this would be only for ZIP files, not other file types... and in any case, you'd have to actually upload the file and submit away from the form, then check, then loop back to the form if anything is detected and manually show an error message.  In general this seems like a lot of work (where some of the steps are perhaps not even possible) for a use case that seems pretty rare.

    The Expression Guru
    April 22, 2021

    Thank you for the response. Will look into possible workaround for now.