2 Replies Latest reply: Feb 15, 2013 7:02 PM by jsmith RSS

    JavaFx 2.2 - File Uploder

      I'm new to Java FX.I need to add file uploader to my JavaFX application.

      I'm trying to find a FXML tag for file chooser.So what is the FXML tag for the file chooser?
        • 1. Re: JavaFx 2.2 - File Uploder
          Hi. FXML doesn’t have such a tag. You can use a FileChooser dialog in your java code:
          • 2. Re: JavaFx 2.2 - File Uploder
            The FileChooser is actually the easy part.

            A full service file upload widget is hard - I tried coding something up quick and found it difficult, so have abandoned that for now.

            Simple file uploads of a single file of a known type and encoding are fine, but writing an uploader which has nice stuff like reporting progress, not freezing the UI thread, uploading different content types, specifying the right mime types and character encodings, uploading multiple files at a time, decoupling the upload process from the UI by providing callbacks so that you can have an entirely customized UI, handling error conditions gracefully, allowing users to cancel in process uploads, taking care of bad server responses, submitting other form data as metadata with the upload, etc. etc. is actually pretty tricky.

            What would be nice is a set of JavaFX components which replicate the functionality of something like swfupload (which Google currently use as the basis of their upload widgets even though the Flash platform is buggy in this regard).