Import and unzip password protected ZIP file

0
Hi,   I need to import a password protected ZIP-file from a SFTP server and subsequently unzip it, and process the files in it.    I'm unable to find any modules that allow for unzipping password protected files.    In addition this will all be done through a scheduled event, so no way to manually enter the password somewhere in the flow.
asked
1 answers
1

Have a look at the module https://marketplace.mendix.com/link/component/108292 this uses the commons-compress library, but can serve as an example.

Using the module as starting point you might be able to rewrite the implementation with the use of the zip4j library found here: https://github.com/srikanth-lingala/zip4j

Zipping and unzipping (with password) is described in example code here: https://www.baeldung.com/java-password-protected-zip-unzip

The schedueld event needs to have access to the password, maybe this can be stored in either a constant or in the database as an encrypted value?

answered