我有文件对象和模型数据,我想将数据发送到服务器端。
下面是我的Ajax代码
var DebitOverrideSchedule =
{
BankAccID: BankAccountID,
OvvrideFlag : 0,
OverriderReason : OverriderReason,
OverrideAction : OverrideAction,
CurrentSettlementFreqPeriodValue : CurrentSettlementFreqPeriodValue,
SettlementChangeRequestFreqPeriodValue :
CurrentSettlementFreqPeriodValue,
CurrentSettlementFreqPeriodDesc :
SettlementChangeRequestFreqPeriodValue,
SettlementChangeRequestFreqPeriodDesc :
SettlementChangeRequestFreqPeriodDesc,
settlementCycle : settlementCycle
};
$.ajax({
url: url,
traditional: true,
data: JSON.stringify(DebitOverrideSchedule),
contentType: "application/json",
type: 'POST',
success: function (data)
{
}
现在,我想使用当前的ajax调用在模型数据中添加文件对象。让我知道可能的解决方案