mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Support for file upload in asynctask.js
This commit is contained in:
@@ -215,11 +215,17 @@ $(function () {
|
|||||||
'this page and try again.'
|
'this page and try again.'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
console.log($(this).get(0))
|
||||||
|
var formData = new FormData($(this).get(0))
|
||||||
|
formData.append('ajax', '1');
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
'type': 'POST',
|
'type': 'POST',
|
||||||
'url': $(this).attr('action'),
|
'url': $(this).attr('action'),
|
||||||
'data': $(this).serialize() + '&ajax=1',
|
'data': formData,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
'success': async_task_callback,
|
'success': async_task_callback,
|
||||||
'error': async_task_error,
|
'error': async_task_error,
|
||||||
'context': this,
|
'context': this,
|
||||||
|
|||||||
Reference in New Issue
Block a user