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.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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.

Reply
  • 0
    Certified Lead Developer

    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.

Children