-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
In order to work with Ember 4 the method ajaxOptions should return FormData object in 'body' field instead of 'data'. Here is the code:
ajaxOptions: function (url, type, options) {
var data;
if (options && 'data' in options) {
data = options.data;
}
var hash = this._super.apply(this, arguments);
if (
typeof FormData !== 'undefined' &&
data &&
this.formDataTypes.indexOf(type) >= 0
) {
hash.processData = false;
hash.contentType = false;
if (typeof hash.headers !== 'undefined') {
delete hash.headers['content-type'];
}
hash.body = this._getFormData(data);
}
return hash;
}
Metadata
Metadata
Assignees
Labels
No labels