servletsfile-uploadprimefaceswildflytemporary-files

WildFly primefaces Fileupload customization (Encrypted tempFile)


In WildFly26 (undertow) during HttpServletRequest parsing, the parser streams uploded file to the server as temp File.

The undertow's

io.undertow.server.handlers.form.MultiPartParserDefinition.MultiPartUploadHandler class do this.

Primefaces supports also commons-fileupload too.

I would like encrypt the so creating temp files. How can I achieve this?


Solution

  • I doesn't find any solution, so I change primefaces fileuplod method to commons file-upload, based on the primefaces documentation: Primefaces 13 documentation

    Yes commons-fileupload make plain temporary files too, but it is more easier to change.

    I made a pull-request (perhaps without chance) which based on 1.5 version.

    Pull request to commons-fileupload

    With this version you can add an CipherServiceProvider by java SPI, and then the temporary files will be encrypted.