Skip to main content
New Participant
Apr 21, 2021 2:29 PM UTC
Question

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

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
    Apr 21, 2021 4:01 PM UTC

    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
    New Participant
    Apr 22, 2021 3:26 AM UTC

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