GwtMaterialDesign / gwt-material-addins

Custom Components for gwt-material.
https://gwtmaterialdesign.github.io/gmd-addins-demo/
Apache License 2.0
35 stars 46 forks source link

MaterialFileUploader : use the elemental2 XMLHttpRequest instead of manually built JsInteroped one #245

Open vegegoku opened 7 years ago

vegegoku commented 7 years ago

Hi, i am trying to use the Material Design add-ins FileUploader and i faced some limitation when trying to add some headers to the file upload request, and those header are security headers that i cant go without.

by exploring the code i found that GMD uses a manually built JsInteroped XMLHttpRequest object which does not expose the complete features of the XMLHttpRequest which does not provide the user with the fine control over the file upload request.

the XMLHttpRequest is being fully implemented with gwt-elemental, so if we use gwt-elemental then we will be have the full feature, and we can make the XMLHttpRequest object available from the FileUploaderEvents.

kevzlou7979 commented 7 years ago

Thanks we will review this, I think feel free to submit a PR whenever you have time to make a simple prototype then we can refactor it later.

vegegoku commented 7 years ago

i am finalizing the pull request, the only issue is that to use elemental2 GWT 2.8.1 is required while the gwt-material-parent pom has dependency on GWT 2.8.0.

should i open an issue and make a pull request to upgrade to GWT 2.8.1?

@kevzlou7979 do you agree on upgrading to GWT 2.8.1?