Tuesday, March 28, 2017

Re: Multiple file upload best practice?

I think a best practice nowadays would be to use an <input type=file> (which you can hide and "trigger" with .click() when clicking on, say, a button; this is only "cosmetic" though) and XMLHttpRequest advanced features (sending a File object, or possibly a FormData if that's what your server expects; using progress events to track upload).
That requires using JSNI or JsInterop in GWT though.
(note: we've actually been using this for 6 years or so, on an intranet app targeting Firefox ESR; but browser support is much broader nowadays: http://caniuse.com/#feat=xhr2 )

On Tuesday, March 28, 2017 at 4:25:40 PM UTC+2, Matthew McLarty wrote:

I currently have a project that's using the gwtupload component. I'm fairly happy with it except that it does not provide a way to remove a file once it has been uploaded when using its MultiUploader. It only provides a mechanism to remove a file when you use its SingleUploader.

I've posted to the Google group requesting support but it appears the project is no longer being supported.

Because the project appears to be dead, I'm asking here for advice on what the current best practice is for handling uploads of multiple files in GWT. It seems like using GWT's FileUpload and setting the element's "multiple" property is the better way to go. Any advice would be greatly appreciated.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment