0

I use the PrimeFaces fileUpload component and I want to implement a feature in my project where adding a .msg file (format that Outlook uses to save emails) to the fileupload not only adds the .msg file but also checks if it has any mail-attachements and, in case there are attachments, also adds these attachements to the fileupload. For extracting attachements I can use appachi-poi-hsmf.

I could to this in the backend-bean method that the fileUpload's fileUploadListener points to, but this means that it would only happend after the user has already pressed the upload button. I would like to show the user what attachements were extracted from the .msg before that, so basically I want to list the attachement as files in the fileUpload component. Is there any way of doing this? Can I somehow trigger a backend-bean method when the user adds a file to the fileUpload component ? valueChangeListener and 'onAdd' don't seem to do anything here.

Using PrimeFaces 6.2.17

EDIT: Some further information : I found this. This does not work for me, but @Kukeltje refers to a recent version of the 2-fileUpload.js file, I checked out the same file for PF version 6.2 and it does not appear to contain the onAdd property, so maybe that's why it doesn't work

Christian O.
  • 379
  • 1
  • 11
  • According to this `onAdd` was added in Elite 6.2.6 https://github.com/primefaces/primefaces/issues/3775 – Melloware Jan 05 '22 at 18:04

0 Answers0