1

I'm using JavaFX (from jdk 1.7) to display a angular web page:

final private WebView browser = new WebView();
final private WebEngine webEngine = browser.getEngine();
webEngine.load("http://localhost:8080/myApp");

In this angular application, I use the javascript FileReader to load the base64 content of the file (FileReader.readAsDataURL).

The problem is that JavaFX's WebEngine does not support FileReader (although some claim it does):

ReferenceError: Can't find variable: FileReader

The functionality I want:

  • Send a message to a REST-WS
  • This message may contain multiple attachments
  • Do not store the attachment on the server before the message is send
  • I do NOT need to preview the attachments (just the name)

Note: JavaFX's WebEngine does not support multiple file input (so does not work!)

Is there an alternative way to achieve this?

Thomas Stubbe
  • 1,945
  • 5
  • 26
  • 40
  • Any solution you found? I am having same issue now :( – Shuwn Yuan Tee Oct 17 '16 at 04:13
  • We decided not to go down this way. But the only alternative I can think of, is to hook the uploadFile event (the click on the button or something) to the back-end and open a JavaFX FileUpload window. then after the upload is complete, trigger an event from the back-end to notify the front-end... Yes I know, it's ugly as hell... =/ In my advise, if it's not to late: ditch JavaFX. Technology is crap and will be dead in a couple of years – Thomas Stubbe Oct 17 '16 at 13:30

0 Answers0