Monday, April 20, 2015

Re: Help Posting form with file input using elemental

I'm sure Jens' answer would also work, but I had already tried this approach (very similar) and it seems to work.

    public static native FormData getFormData() /*-{
        var formElement = $doc.getElementById("uploadForm");
        return new FormData(formElement);
    }-*/;


On Monday, April 20, 2015 at 7:02:59 PM UTC-5, Jens wrote:
Seems like there is no obvious Elemental API to create a FormData instance. Maybe JSNI works:

private native FormData createFormData(FormElement elem) /*-{
  return new FormData(elem);
}-*/;


-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment