This content has been marked as final. Show 2 replies
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).