You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to submit a form upload using the Ajax request but it appears that the contentType is being overridden with the resolveSettings() method of the Ajax class. In my example below when I observe the request to the server it is setting the content type to urlencoded instead of using my choice of multipart/form-data.
form.bind("submit", null, new Function() {
public boolean f(Event e) {
Ajax.ajax(Ajax.createSettings().setType("post").setContentType("multipart/form-data")
.setUrl(form.attr("url")).setData(form).setSuccess(new Function() {
public void f() {
Window.alert("SUCCESS");
}
}));
e.preventDefault();
return true;
}
});
The text was updated successfully, but these errors were encountered:
I am trying to submit a form upload using the Ajax request but it appears that the contentType is being overridden with the resolveSettings() method of the Ajax class. In my example below when I observe the request to the server it is setting the content type to urlencoded instead of using my choice of multipart/form-data.
The text was updated successfully, but these errors were encountered: