Support for file upload in asynctask.js

This commit is contained in:
Raphael Michel
2022-02-03 11:21:49 +01:00
parent 02034cacbf
commit 4c71995560

View File

@@ -215,11 +215,17 @@ $(function () {
'this page and try again.'
));
console.log($(this).get(0))
var formData = new FormData($(this).get(0))
formData.append('ajax', '1');
$.ajax(
{
'type': 'POST',
'url': $(this).attr('action'),
'data': $(this).serialize() + '&ajax=1',
'data': formData,
processData: false,
contentType: false,
'success': async_task_callback,
'error': async_task_error,
'context': this,