Image Upload and ajax "data" property
Image Upload and ajax "data" property
Hello,
I am using the ajax setup as follows for my editor:
jobEditor = new $.fn.dataTable.Editor( {
ajax: {
url: '/ajax/table.bus_job.php',
data: {
SESSION_NAME: SESSION_NAME,
}
},
...
Which works great.. any CREATE or EDIT actions submit my session_name variable along with everything else that editor submits via ajax.
However, with an image-field in my table, since the image is uploaded asynchronously, this variable isn't being submitted via ajax along with the file-data. Is there any way to make this happen?
( as a workaround, I've edited my ajax-file, and made it ignore this variable-check if I'm doing a file-upload, but I'd like to have it working )
Thanks,
David
This question has an accepted answers - jump to answer
Answers
Hi David,
If you use:
i.e.
ajax.data
as a function, then the upload action will detect that and use the function just like Editor does. It looks like it doesn't currently detect ajax.data as an object - I'll look into that.Allan